Hello,
What am I doing wrong?
I installed the backup/restore module for OpenCart 1.3 and did a backup of my MySQL database successfully. I modified the records' values and then tried to restore the database and it failed. The original backup shows all values enclosed by apostrophes, I have tried to enclose and leave them out and when I tried to restore I still get an error
1. shows records in the TABLE category
TRUNCATE TABLE `category`;
INSERT INTO `category` (`category_id`, `image`, `parent_id`, `sort_order`, `date_added`, `date_modified`) VALUES (2,'BALLAST.jpg',0,1,'2009-01-31 01:04:25','2009-08-06 19:12:03');
INSERT INTO `category` (`category_id`, `image`, `parent_id`, `sort_order`, `date_added`, `date_modified`) VALUES (5,'CHRISTMASLIGHTS.jpg',0,2,'2009-01-31 01:04:25','2009-08-06 19:12:03');
INSERT INTO `category` (`category_id`, `image`, `parent_id`, `sort_order`, `date_added`, `date_modified`) VALUES (6,'SECURITYLIGHTING.jpg',0,9,'2009-01-31 01:04:25','2009-08-06 19:12:03');
2. shows the error 1064 that I get
Error: 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 'TRUNCATE TABLE `category`; INSERT INTO `category` (`category_id`, `image`, `p' at line 3
Error No: 1064
TRUNCATE TABLE `address`; TRUNCATE TABLE `category`; INSERT INTO `category` (`category_id`, `image`, `parent_id`, `sort_order`, `date_added`, `date_modified`) VALUES (2,'BALLAST.jpg',0,1,'2009-01-31 01:04:25','2009-08-06 19:12:03'); INSERT INTO `category` (`category_id`, `image`, `parent_id`, `sort_order`, `date_added`, `date_modified`) VALUES (5,'CHRISTMASLIGHTS.jpg',0,2,'2009-01-31 01:04:25','2009-08-06 19:12:03'); INSERT INTO `category` (`category_id`, `image`, `parent_id`, `sort_order`, `date_added`, `date_modified`) VALUES (6,'SECURITYLIGHTING.jpg',0,9,'2009-01-31 01:04:25','2009-08-06 19:12:03');
3. a screenshot of TABLE category
I would be more interested in the sql command right before:
Code: Select all
TRUNCATE TABLE `category`;
I looked further into it and there is nothing wrong with the way I did it. The problem was with the backup/restore code. Because I uploaded the same SQL commands manually to MySQL database and it took it successfully.
Who is online
Users browsing this forum: No registered users and 33 guests