Welcome to WebmasterWorld Guest from 174.129.151.95

Forum Moderators: open

Message Too Old, No Replies

Very simple Insert Error.don't see why it's not working

   
9:16 pm on Jul 6, 2012 (gmt 0)



So, no idea why this isn't working for me...

Code is as follows:

insert into test (unique,Bathrooms,Bedrooms,City,County,Number,Rid) values ('1','3.00','5.00','San Francisco','San Francisco','34','2729')

But, when I take out the "unique" and the "1" out of the key/values, as below, it works:

insert into test (Bathrooms,Bedrooms,City,County,Number,Rid) values ('3.00','5.00','San Francisco','San Francisco','34','2729')

The error:

#1064 - 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 'unique,Bathrooms,Bedrooms,City,County,Number,Rid) values ('1',' at line 1

What am I overlooking?

Thanks for the help in advance.
10:08 pm on Jul 6, 2012 (gmt 0)

10+ Year Member



I believe "unique" is a reserved word in MySQL.
10:33 pm on Jul 6, 2012 (gmt 0)



...and that was it...

Thanks for catching that - I had absolutely no idea...thought I was going crazy!

Thanks Wicky