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!! Quote 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()); Quote 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 Quote 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']}'" Quote Link to comment https://forums.phpfreaks.com/topic/46329-update-problem/#findComment-225430 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.