Heya. An SQL statement of mine isn't working properly, and I can't work out why it's doing what it is. The code is:
(all variables have been declared and contain valid data for the database, connection has been successfully made to the database, etc...). The error that it's giving is this:
It's strange because I have queries like this in other areas of my site and it's just this one that doesn't seem to be working! If anyone knows what I'm doing wrong here, a push in the right direction would be greatly appreciated!
| Code: |
| $sqlmsg = "insert into messaging (from_user, to_user, subject, msg, time, ip, msg_read, msg_all, high_priority) values ('$curruser2', '$to_user', '$msgsubject', '$message', '$time', '$sendip', '$msg_read', '$allmsg2', '$hp2')";
mysql_query ($sqlmsg) or die(mysql_error()); |
(all variables have been declared and contain valid data for the database, connection has been successfully made to the database, etc...). The error that it's giving is this:
| Quote: |
| 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 'high_priority) values ('admin', 'user', 'testing', 'message', |
It's strange because I have queries like this in other areas of my site and it's just this one that doesn't seem to be working! If anyone knows what I'm doing wrong here, a push in the right direction would be greatly appreciated!
