Insert problem
Posted: Mon Nov 29, 2004 8:55 am
Why am I getting this error, I have used it hundreds of times, and am only changing the variables and the column names. This is the code that I am using:
And this is the error I am getting:
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 'long) VALUES ('test', '29/11/04 14:54', 'test', 'test')' at lin
I am connected to the database, and the table exists with all of those columns. As you can see, there is nothing that it being inserted into the database that should cause parsing errors.
Thanks,
Archy
Code: Select all
$sql = "INSERT INTO news (name, date, short, long) VALUES ('$nameU', '$timeNow', '$shortU', '$longU')";
$rs = mysql_query($sql) or die(mysql_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 'long) VALUES ('test', '29/11/04 14:54', 'test', 'test')' at lin
I am connected to the database, and the table exists with all of those columns. As you can see, there is nothing that it being inserted into the database that should cause parsing errors.
Thanks,
Archy