Forum Moderators: coopster
I'm running an SQL statement to select a minimum value, here it is examplified:
SELECT MIN( time ) FROM `ordertable` WHERE company = 'Example'
and I know this is fine as I've run it in my database and it's all good.
I just can't find a way of printing this result or assigning it to a variable. The usually trusty...
while($row = mysql_fetch_array($result))
{
echo $row['time'];
}
Is just giving me this:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hhip99/public_html/admin/invoicehowards.php on line 111
I've tried about 15 different approaches but haven't had any joy. Would someone please put me out of my misery and hand me the simple solution! Thanks very much.