[SOLVED]Help needed in query
Posted: Thu Jul 15, 2004 8:01 pm
I have a db table of comics titles with a primary index called comicNum and it is auto-incremented.... How can i get the largest value in db???
I tried this but it does not work... does not return anything....
Can anyone help me??
I tried this but it does not work... does not return anything....
Can anyone help me??
Code: Select all
<?php
$query = "SELECT MAX(comicNum) FROM archive";
$result = mysql_query($query) or die(MySQL_Error());
$row = mysql_fetch_array($result);
?>