note 16031 added to function.max

From: Date: Sat, 13 Oct 2001 13:49:57 +0000
Subject: note 16031 added to function.max
Groups: php.notes 
Request: Send a blank email to php-notes+get-18877@lists.php.net to get a copy of this message
People kept asking me how to select the highest ID from a table. Here it is... $query1=MYSQL_QUERY("SELECT max(id) as max_id FROM table"); $getvar=MYSQL_FETCH_ARRAY($query1); $id=$getvar["max_id"]; -- http://www.php.net/manual/en/function.max.php http://master.php.net/manage/user-notes.php?action=edit+16031 http://master.php.net/manage/user-notes.php?action=delete+16031 http://master.php.net/manage/user-notes.php?action=reject+16031

« previous php.notes (#18877) next »