Log in

View Full Version : Give error SQL syntax. Where is the problem ?



winpeace
02-05-2009, 09:30 PM
I have a problem Importing Mysql issues.I import one value well and import the 2nd value by itself but when import more than one value it gives error.

I import this code(first value) well;

INSERT INTO `jos_ezrealty_country` (`id`, `name`, `published`, `checked_out`, `checked_out_time`, `editor`, `ordering`) VALUES
('5', 'AKSARAY', '1', '0', '0000-00-00 00:00:00', 'NULL', '77')
or second value well;

INSERT INTO `jos_ezrealty_country` (`id`, `name`, `published`, `checked_out`, `checked_out_time`, `editor`, `ordering`) VALUES
('6', 'AMASYA', '1', '0', '0000-00-00 00:00:00', 'NULL', '76')
But when import two value it gives error;


INSERT INTO `jos_ezrealty_country` (`id`, `name`, `published`, `checked_out`, `checked_out_time`, `editor`, `ordering`) VALUES
('5', 'AKSARAY', '1', '0', '0000-00-00 00:00:00', 'NULL', '77')
('6', 'AMASYA', '1', '0', '0000-00-00 00:00:00', 'NULL', '76')

Error this;
#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 '('6', 'AMASYA', '1', '0', '0000-00-00 00:00:00', 'NULL', '76')' at line 3

What is the solution please :(

winpeace
02-05-2009, 09:50 PM
Ok I found I miss comma;

INSERT INTO `jos_ezrealty_country` (`id`, `name`, `published`, `checked_out`, `checked_out_time`, `editor`, `ordering`) VALUES
('5', 'AKSARAY', '1', '0', '0000-00-00 00:00:00', 'NULL', '77'),
('6', 'AMASYA', '1', '0', '0000-00-00 00:00:00', 'NULL', '76')