Jump to content

[SOLVED] Error: You have an error in your SQL syntax.. yada yada :P


MikeDXUNL

Recommended Posts

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

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());   

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.