'Status' is either a 1 or a 2 or a 0.
I recieve errors when it's a 0, but not when it's a 1. But the UPDATE query seems to run anyway, even with the error message displaying..
Secondly, even when there isn't anything in the database for the query to run on (Nothing with the correct TimeStamp and correct status) The echo is being processed so the while loop is running..
Any thoughts would be appreciated.
Thanks
David
Code: Select all
$query = "SELECT * FROM `Game Information` WHERE `TimeStamp` <= $timeStamp AND `Status` = 0";
$result = mysql_query($query);
while( $row = mysql_fetch_array($result, MYSQL_NUM) ){
echo "We are here";
$gameQuery = "UPDATE `Game Information` SET `Status` = 1 WHERE `Game Number` = $row[0]";
$result = mysql_query($gameQuery);
}