Error import database - Wrong Syntax to use when inserting data - standalone version - | Report Bugs | Forum Archive

The free forums are no longer in use. It remains available as read-only archive.

Lost password?
Advanced Search
Forum Scope


Forum Options

Minimum search word length is 3 characters – maximum search word length is 84 characters
The forums are currently locked and only available for read only access
Error import database – Wrong Syntax to use when inserting data – standalone version –
October 14, 2016
3:44 pm
Jon Smit
New Member
Forum Posts: 1
Member Since:
October 14, 2016
sp_UserOfflineSmall Offline


May I ask you please some support because I’m facing errors when I try to import through phpmyadmin the database created by xcloner.

Query SQL:

INSERT INTO `tablename`

‘2’, ‘footer’, ‘Site Footer’, ”, ”, ”, ”, ‘0’, ‘1’, ”, ”, ‘header-footer’, ‘0’, ‘0’

MySQL Message: Documentation

#1062 – Duplicate entry ” for key ‘url’

I understood that the problem is that xcloner creates the db structure using a syntax as below described.

In phpmyadmin export page > Custom > Data creation options

Syntax to use when inserting data:
XCloner seems to use one of the first two options:
include column names in every INSERT statement
Example: INSERT INTO tbl_name (col_A,col_B,col_C) VALUES (1,2,3)
insert multiple rows in every INSERT statement
Example: INSERT INTO tbl_name VALUES (1,2,3), (4,5,6), (7,8,9)

when I manually export db I use the default option which is the third one and everything works just fine:
both of the above
Example: INSERT INTO tbl_name (col_A,col_B) VALUES (1,2,3), (4,5,6), (7,8,9)

This is an example of the xcloner structure and the phpmyadmin manual export
xcloner db structure
# Dumping data for table `engine4_activity_actions`
INSERT INTO `tablename` VALUES (‘1′,’signup’,’user’,’2′,’user’,’2′,”,'[]’,’date’,’0′,’0′,’0′);
INSERT INTO `tablename` VALUES (‘2′,’signup’,’user’,’3′,’user’,’3′,”,'[]’,’date’,’0′,’0′,’0′);

Manually export through phpmyadmin:
INSERT INTO `tablename` (`col1`, `col2`, `col3`) VALUES
(1, ‘signup’, ‘user’, 2, ‘user’, 2, ”, ‘[]’, ‘date’, 0, 0, 0),
(2, ‘signup’, ‘user’, 3, ‘user’, 3, ”, ‘[]’, ‘date’, 0, 0, 0),

Could you please help me to find a solution for this?
thank you very much in advance for your support.

November 2, 2016
1:31 am
Melbourne, Australia
Forum Posts: 13
Member Since:
October 6, 2012
sp_UserOfflineSmall Offline

I too was/am having problem with importing an xCloner 3.6 sql dump.
— Not sure if this is the same issue as your but my import attempts in phpMyAdmin were always failing at the [ _assets] table.

I did an sql export of same database… and compared both text files using WinMerge – windows 10 pro – utility.

… and found the anomaly .
Following is an example from the xxxx_assets table

For example;
in the xCloner dump at line 49 (notepad++):
INSERT INTO `jz32xtd_assets` VALUES (‘1′,’0′,’1′,’249′,’0′,’root.1′,’Root Asset’,'{\”\”:{\”6\”:1,\”2\”:1},\”core.login.admin\”:{\”6\”:1},\”core.login.offline\”:{\”6\”:1},\”core.admin\”:{\”8\”:1},\”core.manage\”:{\”7\”:1},\”core.create\”:{\”6\”:1,\”3\”:1},\”core.delete\”:{\”6\”:1},\”core.edit\”:{\”6\”:1,\”4\”:1},\”core.edit.state\”:{\”6\”:1,\”5\”:1},\”core.edit.own\”:{\”6\”:1,\”3\”:1}}’);

The dump from my hosting service (phpMyAdmin ) using same output options that xCloner uses.
INSERT INTO `jz32xtd_assets` (`id`, `parent_id`, `lft`, `rgt`, `level`, `name`, `title`, `rules`) VALUES(1, 0, 1, 249, 0, ‘root.1’, ‘Root Asset’, ‘{“”:{“6″:1,”2″:1},”core.login.admin”:{“6″:1},”core.login.offline”:{“6″:1},”core.admin”:{“8″:1},”core.manage”:{“7″:1},”core.create”:{“6″:1,”3″:1},”core.delete”:{“6″:1},”core.edit”:{“6″:1,”4″:1},”core.edit.state”:{“6″:1,”5″:1},”core.edit.own”:{“6″:1,”3”:1}}’);

The difference here is [ ‘{\” ] – i.e. the backslash.
When I did a search & replace for that string minus the \ … saved the file.
— applied across the whole sql text file – 832 hits.

phpMyAdmin had no trouble importing the (modified) xCloner file.

I am trying to figure out where xCloner is putting this backslash in – I suspect it is trying to ‘escape’ a string somewhere.
No luck yet.

I am posting this finding here in th hope that I can get Ovi to take a look. I will post a Contact form and refer him to this post.
— This is quite an issue…. I mean, what good is a backup if one cannot restore!
—– well, maybe the xCloner restore works – personally, I never user it.

Anyhow, I hope this helps someone else a little.


Forum Timezone: America/Chicago
Most Users Ever Online: 867
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
mlguru: 30
Django29: 29
Andy: 21
D: 21
Marcus: 20
Jamie F: 19
Member Stats:
Guest Posters: 737
Members: 9955
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
Ich Meine
Moderators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0