I am trying to restore a MySQL 5 database but I keep getting errors but since I just have to restore several lines I thought I could insert them using the editor.
The table is already created.
What other syntax do I need besides this:
INSERT INTO `mytable` VALUES (1081, 980, 'Steve Miller', '', '', '', , '', '', '', , , , '') ;
How do I insert several entries into a table from the editor
Anse,
I used a Wordpress plugin to create the backup - more on that here:
http://www.davecolorado.com/index.php/wordpress-mysql-scheduled-backup-warning/
I am not sure if I am missing quotes or not.
How can I just insert several lines using the SQL editor?
Can't I just do something like this:
INSERT INTO `pm` VALUES (978, '', '', '', '', '', '', 'http://www.', '', 0, 0, '', 2008-03-05 22:45:33, 0, 44, 600, '35.207255,-101.833894', 9, 1, 0) ;
INSERT INTO `pm` VALUES (979, 'test', '', '', '', '', '', 'http://www.', '', 0, 0, '', 2008-03-06 07:41:39, 0, 34, 467, '35.2225, -80.837539', 10, 0, 0) ;
INSERT INTO `pm` VALUES (980, 'test', '', '', '', '', '', 'http://www.', '', 0, 0, '', 2008-03-06 12:39:38, 0, 6, 110, '33.81452532651738, -118.17237854003906', 12, 0, 0) ;
Is it required to drop or create a table first?
I used a Wordpress plugin to create the backup - more on that here:
http://www.davecolorado.com/index.php/wordpress-mysql-scheduled-backup-warning/
I am not sure if I am missing quotes or not.
How can I just insert several lines using the SQL editor?
Can't I just do something like this:
INSERT INTO `pm` VALUES (978, '', '', '', '', '', '', 'http://www.', '', 0, 0, '', 2008-03-05 22:45:33, 0, 44, 600, '35.207255,-101.833894', 9, 1, 0) ;
INSERT INTO `pm` VALUES (979, 'test', '', '', '', '', '', 'http://www.', '', 0, 0, '', 2008-03-06 07:41:39, 0, 34, 467, '35.2225, -80.837539', 10, 0, 0) ;
INSERT INTO `pm` VALUES (980, 'test', '', '', '', '', '', 'http://www.', '', 0, 0, '', 2008-03-06 12:39:38, 0, 6, 110, '33.81452532651738, -118.17237854003906', 12, 0, 0) ;
Is it required to drop or create a table first?
In principle that's correct, but also in these statements there are missing some single quotes - the date and time values have to be quoted:
I guess you should not use this plugin for backing up your data, rather use HeidiSQL or mysqldump.exe .
INSERT INTO `pm` VALUES (978, '', '', '', '', '', '', 'http://www.', '', 0, 0, '', '2008-03-05 22:45:33', 0, 44, 600, '35.207255,-101.833894', 9, 1, 0);
I guess you should not use this plugin for backing up your data, rather use HeidiSQL or mysqldump.exe .
Please login to leave a reply, or register at first.