I'm trying to provide a much faster way of verifing information, therefore I would like to do a multiple update rather than having to edit each record one at a time.
Which leads me to my test:
PHP Code:
<?php $sql="SELECT * FROM FootballCamp LIMIT 10"; $result=mysql_query($sql);
For testing purposes I don't actually update the database, so to check my data I echo the sql statements that it creates.
And let's say I check 2 boxes (doesn't matter which ones) it will only update the first two records with 1 and the rest will be 0 even if I didn't choose them.
And it would output this:
UPDATE FootballCamp SET WaiverSigned='1' WHERE ID='19'
UPDATE FootballCamp SET WaiverSigned='1' WHERE ID='18'
UPDATE FootballCamp SET WaiverSigned='' WHERE ID='17'
UPDATE FootballCamp SET WaiverSigned='' WHERE ID='16'
UPDATE FootballCamp SET WaiverSigned='' WHERE ID='15'
UPDATE FootballCamp SET WaiverSigned='' WHERE ID='14'
UPDATE FootballCamp SET WaiverSigned='' WHERE ID='13'
UPDATE FootballCamp SET WaiverSigned='' WHERE ID='12'
UPDATE FootballCamp SET WaiverSigned='' WHERE ID='11'
UPDATE FootballCamp SET WaiverSigned='' WHERE ID='10'
Any ideas???
Thanks
Last edited by cinematic_jesi; 02-27-2009 at 10:08 AM.
Bookmarks