Thanks for the suggestion MadMax, but I still get the error even after I put in the quotes.
I've changed weight and case to prod_weigh and prod_cas also, but that still gave me the same error. I thought series and name may also be reserved names, so i changed them to prod_nam and prod_s.
So, my query looks like this
PHP Code:
$queryprod = "INSERT INTO _product ('stock_num', 'prod_s', 'prod_nam', 'thread_id', 'dim_h', 'dim_w', 'dim_l', 'prod_weigh', 'prod_cas') VALUES ('$prod_stocknum', '$prod_series', '$prod_name', '$t', '$prod_height', '$prod_width', '$prod_length', '$prod_weight', '$prod_case')";
$resultprod = mysql_query($queryprod) or die ("Error in query: $queryprod. " . mysql_error());;
My table looks like this:
PHP Code:
inv_id int(255) UNSIGNED No auto_increment
stock_num varchar(255) No
prod_s varchar(255) No
prod_nam varchar(255) No
thread_id int(255) UNSIGNED No 0
dim_h varchar(255) No 0
dim_w varchar(255) No 0
dim_l varchar(255) No 0
prod_weigh varchar(255) No
prod_cas varchar(10) No 0
and my error looks like this:
Error in query: INSERT INTO product ('stock_num', 'prod_s', 'prod_nam', 'thread_id', 'dim_h', 'dim_w', 'dim_l', 'prod_weigh', 'prod_cas') VALUES ('10175', 's1a', 'frikken plabe', '325', '12.4', '123', '21', '12.6', '4'). 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 ''stock_num', 'prod_s', 'prod_nam', 'thread_id', 'dim_h', 'dim_w
I do't get it, it looks right to me, no matter how i look at it.
Please help!
Thanks!
Chap