Hi, I was just wondering if there was a simpler way to write the following code. This is assuming that I know what row it is located in and what field and that I want just the one value from the table.
Thanks for readingPHP Code:$query = "SELECT field FROM tablename where ID=1";
$result = mysql_query($query)
or die ("Couldn't execute query.");
$value = mysql_fetch_array($result,MYSQL_ASSOC);
$value= $value['field'];echo "pop $value pop";
![]()



Reply With Quote

Bookmarks