Jump to content

Sql Error


yrstruly

Recommended Posts

Can somebody help me please.Im getting this error with the included code: #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 '02141', '(123) 555-7890'), ('Megastore', '34 Suburban View', NULL, '31066', '' at line 7INSERT INTO stores (name, address1, address2, zip_code, phone) VALUES('Ray''s Shop', '49 Main Street', NULL, '63939', '(123) 456-7890'),('Little Lulu''s', '12904 Rockville Pike', '#310', '10580', '(123) 654- 7890'),('The Store Store', '8200 Leesburg Pike', NULL, '02461', '(123) 456- 8989'),('Smart Shop', '9 Commercial Way, NULL, '02141', '(123) 555-7890'),('Megastore', '34 Suburban View', NULL, '31066', '(555) 456-7890'),('Chain Chain Chain', '8th & Eastwood', NULL, '80726', '(123) 808-7890'),('Kiosk', 'St. Charles Towncenter', '3890 Crain Highway', '63384', '(123) 888-4444'),('Another Place', '1600 Pennsylvania Avenue', NULL, '05491', '(111) 456- 7890'),('Fishmonger''s Heaven', 'Pier 9', NULL, '53571', '(123) 000-7890'),('Hoo New', '576b Little River Turnpike', NULL, '08098', ‘(123) 456-0000'),('Vamps ''R'' Us', 'Our Location', 'Atwood Mall', '02062', '(222) 456- 7890'),('Five and Dime', '9 Constitution Avenue', NULL, '73503', '(123) 446- 7890'),('A & P', '890 North Broadway', NULL, '85329', '(123) 456-2323'),('Spend Money Here', '1209 Columbia Pike', NULL, '10583', '(321) 456- 7890')

Link to comment
Share on other sites

Can somebody help me please.Im getting this error with the included code: #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 '02141', '(123) 555-7890'), ('Megastore', '34 Suburban View', NULL, '31066', '' at line 7INSERT INTO stores (name, address1, address2, zip_code, phone) VALUES('Ray''s Shop', '49 Main Street', NULL, '63939', '(123) 456-7890'),('Little Lulu''s', '12904 Rockville Pike', '#310', '10580', '(123) 654- 7890'),('The Store Store', '8200 Leesburg Pike', NULL, '02461', '(123) 456- 8989'),('Smart Shop', '9 Commercial Way, NULL, '02141', '(123) 555-7890'),('Megastore', '34 Suburban View', NULL, '31066', '(555) 456-7890'),('Chain Chain Chain', '8th & Eastwood', NULL, '80726', '(123) 808-7890'),('Kiosk', 'St. Charles Towncenter', '3890 Crain Highway', '63384', '(123) 888-4444'),('Another Place', '1600 Pennsylvania Avenue', NULL, '05491', '(111) 456- 7890'),('Fishmonger''s Heaven', 'Pier 9', NULL, '53571', '(123) 000-7890'),('Hoo New', '576b Little River Turnpike', NULL, '08098', ‘(123) 456-0000'),('Vamps ''R'' Us', 'Our Location', 'Atwood Mall', '02062', '(222) 456- 7890'),('Five and Dime', '9 Constitution Avenue', NULL, '73503', '(123) 446- 7890'),('A & P', '890 North Broadway', NULL, '85329', '(123) 456-2323'),('Spend Money Here', '1209 Columbia Pike', NULL, '10583', '(321) 456- 7890')
Hi when i correct line 7, i get the following 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 '456-0000'), ('Vamps ''R'' Us', 'Our Location', 'Atwood Mall', '02062', '(222) ' at line 19INSERT INTO stores (name, address1,address2, zip_code, phone) VALUES('Ray''s Shop', '49 Main Street',NULL, '63939', '(123) 456-7890'),('Little Lulu''s', '12904 RockvillePike', '#310', '10580', '(123) 654-7890'),('The Store Store', '8200 LeesburgPike', NULL, '02461', '(123) 456-8989'),('Smart Shop', '9 Commercial Way',NULL, '02141', '(123) 555-7890'),('Megastore', '34 Suburban View',NULL, '31066', '(555) 456-7890'),('Chain Chain Chain', '8th &Eastwood', NULL, '80726', '(123)808-7890'),('Kiosk', 'St. Charles Towncenter','3890 Crain Highway', '63384','(123) 888-4444'),('Another Place', '1600 PennsylvaniaAvenue', NULL, '05491', '(111) 456-7890'),('Fishmonger''s Heaven', 'Pier 9',NULL, '53571', '(123) 000-7890'),('Hoo New', '576b Little RiverTurnpike', NULL, '08098', ‘(123)456-0000'),('Vamps ''R'' Us', 'Our Location','Atwood Mall', '02062', '(222) 456-7890'),('Five and Dime', '9 ConstitutionAvenue', NULL, '73503', '(123) 446-7890'),('A & P', '890 North Broadway', NULL,'85329', '(123) 456-2323'),('Spend Money Here', '1209 ColumbiaPike', NULL, '10583', '(321) 456-7890')
Link to comment
Share on other sites

You have a funky quote mark there instead of an apostrophe:

‘(123) 456-0000'),

It should be:

'(123) 456-0000'),

EDIT: Beat ya DD. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...