jQuery
jQuery

Reputation: 88

Why is this Insert Statement throwing an error?

I really dont know why this statement isnt working with mysql... do you have any idea? Am I blind?

Error Message:

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 'VALUES ('Wampanoag Country Club', 'West Hartford', 'CT', '', '1', '', '')' at line 9

INSERT INTO companies 
(companies.firmname,
companies.city,
companies.state,
companies.zip,
companies.country,
companies.address1,
companies.address2 
VALUES ('Wampanoag Country Club',
'West Hartford',
'CT',
'',
'1',
'',
'')

Upvotes: 0

Views: 28

Answers (2)

whisk
whisk

Reputation: 655

Missing a closing )

 INSERT INTO companies 
                     (
                      companies.firmname, 
                      companies.city,
                      companies.state,
                      companies.zip,
                      companies.country,
                      companies.address1,
                      companies.address2
                     ) <-- need this 
VALUES 
                   (
                     'Wampanoag Country Club',
                     'West Hartford',
                     'CT',
                     '',
                     '1',
                     '',
                     ''
                   )

Upvotes: 1

Ben Abraham
Ben Abraham

Reputation: 482

You are missing a closing ) after companies.address2 and before VALUES

Upvotes: 1

Related Questions