I have a snippet of code below in my program:
$query="select MAX(Menu_Order) from Main_Menu";
$result=mysql_query($query)
or die("Select from Main_Menu table had errors");
$row=mysql_fetch_array($result,MYSQL_ASSOC);
if ($row=="")
$Menu_Order="0";
else
extract($row);
It seems to work ok when the database is empty, but when a value exists in the table, I cannot pull the highest integer value out of the table. What exactly am I doing wrong in my code?