MySQL Forums
Forum List  »  PHP

Re: How do I display the minimum number in my table?
Posted by: Alan Northam
Date: December 09, 2005 02:10PM

Here's the code I wrote but it doesn't display anything:


$sql = "SELECT MIN(SN) FROM TABLE";
$result = @mysql_query($sql,$connection)or die("Could not execute query.") ;
$var1 = mysql_fetch_array($result);
$sn_min = $var1['SN'];
echo "$sn_min";

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.