Skipjackrick Posted March 31, 2008 Share Posted March 31, 2008 This is obviously not the correct syntax for update because I keep getting an error. what do I have incorrect? <?php $result = mysql_query("UPDATE submit SET submit_id=175, team_id=17, angler='Ay Jay', species_id=5, points=10, length=0, yyyy=2008, mm=03, dd=30, image='rick1.jpg', region_id=1 WHERE submit_id=175, team_id=17, angler='Ay Jay', species_id=4, points=20, length=0, yyyy=2008, mm=03, dd=30, image='rick1jpg', region_id=1") or die(mysql_error()); ?> Link to comment https://forums.phpfreaks.com/topic/98840-syntax-for-update-errors/ Share on other sites More sharing options...
BlueSkyIS Posted March 31, 2008 Share Posted March 31, 2008 what is the error? WHERE's must be separated with ANDs, not commas WHERE x = '1' AND y = '2', etc. Link to comment https://forums.phpfreaks.com/topic/98840-syntax-for-update-errors/#findComment-505755 Share on other sites More sharing options...
Skipjackrick Posted March 31, 2008 Author Share Posted March 31, 2008 what is the error? WHERE's must be separated with ANDs, not commas WHERE x = '1' AND y = '2', etc. Ah, yeah, I forgot where's must be separated by AND That fixed it.. Thanks! Link to comment https://forums.phpfreaks.com/topic/98840-syntax-for-update-errors/#findComment-505762 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.