Running PHP version 4.4.4
Scenario
I want to update two fields game1 & game2 with 'n' for game1 and 'a' for game2 based on if field submitted is empty.
Currently using the following
<?php
mysql_connect("", "", "") or die(mysql_error());
mysql_select_db("") or die(mysql_error());
$result = mysql_query("SELECT * FROM pds WHERE submitted = '0'")
or die(mysql_error());
mysql_query("UPDATE pds SET game1 = 'n' WHERE submitted = '0' ");
mysql_query("UPDATE pds SET game2 = 'a' WHERE submitted = '0' ");
?>
My understanding is that php version 4 reconizes an empty field as zero, hence '0'
However nothing is being updated at all - can anyone show me where I have gone wrong.
Thanks
Jon