Hamlets666 Posted December 23, 2006 Share Posted December 23, 2006 $feedme="UPDATE users SET read='$newread' WHERE name='$name'";mysql_query($feedme) or die(mysql_error());[b]Error:[/b][i]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 'read='1' WHERE name='Dyzaster'' at line 1[/i][b]Table:[/b][i]CREATE TABLE `users` (`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY ,`name` TEXT NOT NULL ,`pass` TEXT NOT NULL ,`mail` TEXT NOT NULL ,`about` TEXT NOT NULL ,`read` BIGINT NOT NULL ) ENGINE = MYISAM ;[/i]What`s wrong? Quote Link to comment https://forums.phpfreaks.com/topic/31708-solved-mysql-error-update/ Share on other sites More sharing options...
Jessica Posted December 23, 2006 Share Posted December 23, 2006 read is a reserved word. quote it with backticks$feedme="UPDATE users SET `read`='$newread' WHERE name='$name'"; Quote Link to comment https://forums.phpfreaks.com/topic/31708-solved-mysql-error-update/#findComment-146954 Share on other sites More sharing options...
Hamlets666 Posted December 23, 2006 Author Share Posted December 23, 2006 Ooo, thanks... Quote Link to comment https://forums.phpfreaks.com/topic/31708-solved-mysql-error-update/#findComment-146955 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.