3raser Posted January 27, 2011 Share Posted January 27, 2011 mysql_query("UPDATE mods SET version='$version' AND name='$title' AND descritpion='$description' AND lastupdate='$date' WHERE id='$id'"); I don't think I'm doing it correctly. :/ Link to comment https://forums.phpfreaks.com/topic/225803-multiple-sets-in-a-sql-query/ Share on other sites More sharing options...
jcbones Posted January 27, 2011 Share Posted January 27, 2011 mysql_query("UPDATE mods SET version='$version', name='$title', descritpion='$description', lastupdate='$date' WHERE id='$id'"); Link to comment https://forums.phpfreaks.com/topic/225803-multiple-sets-in-a-sql-query/#findComment-1165755 Share on other sites More sharing options...
petroz Posted January 27, 2011 Share Posted January 27, 2011 Replace your AND's with ",". AND's are used for WHERE statements. Should look like so. UPDATE `table` SET `field1` = 'BLAH!', `field2` = 'FOO', `field3` = 'BAR' WHERE `id` = '1' AND `status` = '1'; Link to comment https://forums.phpfreaks.com/topic/225803-multiple-sets-in-a-sql-query/#findComment-1165756 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.