note 22370 deleted from function.max by didou
| From: | didou@php.net | Date: | Wed, 23 Jul 2003 01:26:02 +0000 |
| Subject: | note 22370 deleted from function.max by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-52478@lists.php.net to get a copy of this message | ||
Note Submitter: nil@csoma.elte.hu
----
MySQL maximum:
$res=mysql_query("select max(ID) from table;");
if(mysql_num_rows($res)==1){
$row=mysql_fetch_object($res):
echo("Largest ID in table 'table': ".$row->ID."<BR>\n");
} else echo("No rows in table 'table'.<BR>\n");
mysql_free_result($ret);
I think it is the fastest of the "clear" ways.