Update Table Error
Posted: Wed Apr 01, 2009 9:27 am
Code: Select all
$sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_interests = '" . str_replace("\'", "''", $interests) . "',user_viewemail = $viewemail, '" . "' user_allowhtml = $allowhtml, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . "
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
}The error show is
Could not update users table
DEBUG MODE
SQL Error : 1064 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 ''' user_allowhtml = 1, user_allow_viewonline = 1, user_notify = 0, user_notify_p' at line 2
UPDATE phpbb_users SET user_email = 'thisbl00d@devnetowrk.com', user_interests = 'pop',user_viewemail = 1, '' user_allowhtml = 1, user_allow_viewonline = 1, user_notify = 0, user_notify_pm = 1, user_popup_pm = 1, user_dateformat = 'd M Y h:i a', user_active = 1, user_actkey = '' WHERE user_id = 2