burtybob Posted October 28, 2007 Share Posted October 28, 2007 mysql_query("UPDATE polls SET `vanswer1`=vanswer1+'1' WHERE `pkid`='$pollid'") or die(mysql_error()); That is my code and i get no error from the die(mysql_error()); part so im guessing there is no problem but why wont the field known as vanswer not +1?? Please can anyone help? Any suggestions are helpful. EDIT: think i realised whats wrong. Link to comment https://forums.phpfreaks.com/topic/75124-solved-update-with-a-1/ Share on other sites More sharing options...
pocobueno1388 Posted October 28, 2007 Share Posted October 28, 2007 remove the quotes from the 1. mysql_query("UPDATE polls SET `vanswer1`=vanswer1+1 WHERE `pkid`='$pollid'") or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/75124-solved-update-with-a-1/#findComment-379925 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.