almightyegg Posted April 9, 2007 Share Posted April 9, 2007 $unjail = mysql_query("UPDATE users WHERE id = '{$mem['id']}' SET jailed='0', jyear='0', jday='0', jailreason='0', jailedby='0'"); No errors, just won't go into the database help!! Link to comment https://forums.phpfreaks.com/topic/46329-update-problem/ Share on other sites More sharing options...
wildteen88 Posted April 9, 2007 Share Posted April 9, 2007 add an or die clause after mysql_query function like so: $unjail = mysql_query("UPDATE users WHERE id = '{$mem['id']}' SET jailed='0', jyear='0', jday='0', jailreason='0', jailedby='0'") or die('Error:<br />' . mysql_error()); Link to comment https://forums.phpfreaks.com/topic/46329-update-problem/#findComment-225389 Share on other sites More sharing options...
almightyegg Posted April 9, 2007 Author Share Posted April 9, 2007 Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id = '1' SET jailed='0', jyear='0', jday='0', jailreason='0', jailedby='0'' at line 1 Link to comment https://forums.phpfreaks.com/topic/46329-update-problem/#findComment-225403 Share on other sites More sharing options...
wildteen88 Posted April 9, 2007 Share Posted April 9, 2007 Your WHERE clause should be at the end of the query. "UPDATE users SET jailed='0', jyear='0', jday='0', jailreason='0', jailedby='0' WHERE id = '{$mem['id']}'" Link to comment https://forums.phpfreaks.com/topic/46329-update-problem/#findComment-225430 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.