Why isn't this query working?

software development

#1

I had 4 hours of sleep last night and I can’t for the life of me figure out where the error is in this query. Anyone who can help me figure this out will be a saint!

INSERT INTO customer
SET ‘customer_id’ = ‘’,
‘customer_documentation’ = ‘Drivers License’,
‘customer_identifier’ = ‘’,
‘customer_referrer’ = ‘’,
‘customer_agree’ = ‘’,
‘customer_duration’ = ‘1’,
‘customer_gender’ = ‘m’,
‘customer_dob’ = ‘0000-00-00’,
‘customer_firstname’ = ‘firstname’,
‘customer_middle’ = ‘’,
‘customer_lastname’ = ‘’,
‘customer_salutation’ = ‘’,
‘customer_address’ = ‘’,
‘customer_city’ = ‘’,
‘customer_state’ = ‘’,
‘customer_zip’ = ‘’,
‘customer_phone’ = ‘555-555-1212’,
‘customer_cell’ = ‘’,
‘customer_email’ = ‘email@netscape.net’,
‘customer_membertype’ = ‘3’,
‘customer_expires’ = ‘0000-00-00’,
‘customer_membership_id’ = ‘AA7MK2K3Y7’,
‘customer_allowcontact’ = ‘n’,
‘customer_archived’ = ‘n’,
‘customer_status’ = ‘New’,
‘customer_notes’ = ‘N’,
‘customer_experience’ = ‘Do not know’,
‘how_heard’ = ‘’,
‘reg_date’ = ‘2007-10-03’,
‘welcome_sent’ = ‘n’,
‘welcome_date’ = ‘0000-00-00’

MySQL said: Documentation
#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 '‘customer_id’ = ‘’,‘customer_documentation’ = ‘Drivers License’,‘customer_identi’ at line 1

================================
Angela Gann
CrimsonDryad Web Design Services
Web Design, Custom Software Development
http://www.crimsondryad.com


#2

Remove the single quotes from around the table name and column names.

si-blog
Max discount on any plan with promocode SCJESSEYTOTAL


#3

Thank you…I feel like such a retard because I know better than to do stupid stuff like that. I can only mark it up to insomnia induced stupor.

You’ve been a real help to me many times, thank you bunches!

================================
Angela Gann
CrimsonDryad Web Design Services
Web Design, Custom Software Development
http://www.crimsondryad.com


#4

You are most welcome.

si-blog
Max discount on any plan with promocode SCJESSEYTOTAL


#5

i’ve only seen that set column=‘value’ syntax with update queries — didn’t know it worked with insert! i use (column1, column2) values (‘value1’, ‘value2’) for mine.

track7 - my dream-hosted site