Click to See Complete Forum and Search --> : MySQL Query Error.


iceafreak99
05-09-2003, 05:59 PM
Please help.. in my code

mysql_query("INSERT INTO items (cat,number,short,price,long,size,c1n,c1v,c2n,c2v,c3n,c3v,o1n,o1v,o2n,o2v,o3n,o3v,y1n,y1v,y2n,y2v,y3 n,y3v) VALUES ($_POST[id], $_POST[number], $_POST[short], $_POST[price], $_POST[long], $_POST[size], $_POST[c1n], $_POST[c1v], $_POST[c2n], $_POST[c2v], $_POST[c3n], $_POST[c3v], $_POST[o1n], $_POST[o1v], $_POST[o2n], $_POST[o2v], $_POST[o3n], $_POST[o3v], $_POST[y1n], $_POST[y1v], $_POST[y2n], $_POST[y2v], $_POST[y3n], $_POST[y3v])");

I get the following error happens..


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,size,c1n,c1v,c2n,c2v,c3n,c3v,o1n,o1v,o2n,o2v,o3n,o3v,y1n,y


No idea why!

Please help.

Andrew

theredguy
05-09-2003, 07:32 PM
isn't "long" directing to "long integer" wich you can't use, because it's a command? maybe if you us another name it'll work then.

Don't attack me if it didn't solve your problem, i have little programming background an almost none at webpages/sql

iceafreak99
05-09-2003, 11:57 PM
Originally posted by theredguy
isn't "long" directing to "long integer" wich you can't use, because it's a command? maybe if you us another name it'll work then.

Don't attack me if it didn't solve your problem, i have little programming background an almost none at webpages/sql

Thanks you nailed it :p