MikeDXUNL Posted February 6, 2008 Share Posted February 6, 2008 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 'read) VALUES ('1', 'Admin', 'fasdfsd', '56', '', '', 'February 5, 2008', 'inbox'' at line 1 mysql_query("INSERT INTO messages(from_userid, from_username, to_userid, to_username, subject, message, datesent, folder, read) VALUES ('$this->from_userid', '$this->from_username', '$this->to_userid', '$this->to_username', '$this->subject', '$this->message', '$this->datesent', '$this->folder', '$this->read')") or die("Error: ". mysql_error()); i did have '".$this->value."' but that doesnt work either any help is kindly appreciated Thanks, Mike Quote Link to comment https://forums.phpfreaks.com/topic/89669-solved-error-you-have-an-error-in-your-sql-syntax-yada-yada-p/ Share on other sites More sharing options...
Stooney Posted February 6, 2008 Share Posted February 6, 2008 Try this, all that's different is read is enclosed with backdrops. I think 'read' is a reserved word. mysql_query("INSERT INTO messages(from_userid, from_username, to_userid, to_username, subject, message, datesent, folder, `read`) VALUES ('$this->from_userid', '$this->from_username', '$this->to_userid', '$this->to_username', '$this->subject', '$this->message', '$this->datesent', '$this->folder', '$this->read')") or die("Error: ". mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/89669-solved-error-you-have-an-error-in-your-sql-syntax-yada-yada-p/#findComment-459471 Share on other sites More sharing options...
MikeDXUNL Posted February 6, 2008 Author Share Posted February 6, 2008 Danke Schon! _ Mike Quote Link to comment https://forums.phpfreaks.com/topic/89669-solved-error-you-have-an-error-in-your-sql-syntax-yada-yada-p/#findComment-459472 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.