RE: [PHP-DB] calling values from a database
| From: | Rick Emery | Date: | Mon, 11 Feb 2002 19:25:45 +0000 |
| Subject: | RE: [PHP-DB] calling values from a database | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-16819@lists.php.net to get a copy of this message | ||
list($mymax) = $mysql_fetch_array($result);
-----Original Message-----
From: Jacob Wyke [mailto:kettle_drum@yahoo.com]
Sent: Monday, February 11, 2002 1:25 PM
To: php-db@lists.php.net
Subject: [PHP-DB] calling values from a database
How can i get a value from a database into a variable???
$db = mysql_connect("localhost", "", "");
mysql_select_db("TEST", $db);
$result = mysql_query("SELECT max(ID) FROM Tut_Main", $db);
But when i try to print $result it displays Resource id #2 instead.
Please help if u can, cheers.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php