Jump to content

[SOLVED] Whats wrong with this BASIC insert .


lynxus

Recommended Posts

Hi Guys,

Im having TERRIBLE problems running an insert for some reason the "syntax" is wrong.

 

Ive checked, double checked and copied from other scripts i KNOW that works.

 

I must be being a complete rtard here.

 

Any ideas whats wrong with:

 

mysql_query("INSERT INTO comments  (to, from, message)

VALUES ('$to', '$from', '$message')") or die(mysql_error()); 

 

Erro i get:

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 'to, from, message) VALUES ('test', 'test', 'somemessage')' at line 1

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.