note 35211 added to function.mysql-result

From: Date: Sat, 23 Aug 2003 15:42:47 +0000
Subject: note 35211 added to function.mysql-result
Groups: php.notes 
Request: Send a blank email to php-notes+get-54958@lists.php.net to get a copy of this message
If you want to fetch the result from a mysql query similar to one of these two queries... $query = mysql_query("SELECT COUNT(*) FROM table"); $query = mysql_query("SELECT LAST_INSERT_ID()"); ... you would use mysql_result() like shown below to retrieve the output as an int. $result = mysql_result($query, 0, 0); ---- Manual Page -- http://www.php.net/manual/en/function.mysql-result.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35211 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35211&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35211&report=yes

« previous php.notes (#54958) next »