MyBB Community Forums

Full Version: Mysql sintax error importing database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I have MyBB 1.4.
with phpmyadmin I want to import a sql file with the database backup.
When I import the file, appears this 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 'fields,conditions,sortby,sortorder,perpage,view_type) VALUES ('1','0','All Users' at line 

I have add some (') to 'fields','conditions','sortby', etc.

But the error persists.

How I can solve this problem??

Thanks
Quote:I have add some (') to 'fields','conditions','sortby', etc.

I think you missed some then.
new error adding (') to this:


INSERT INTO mybb_adminviews

('vid','uid','title','type','visibility','fields','conditions','sortby','sortorder','perpage','view_type'

) VALUES ('1','0','All Users','user','2','a:7:


Error:

 

INSERT INTO mybb_adminviews( 'vid', 'uid', 'title', 'type', 'visibility', 'fields', 'conditions', 'sortby', 'sortorder', 'perpage', 'view_type' )
VALUES (
'1', '0', 'All Users', 'user', '2', 'a:7:{i:0;s:6:\"avatar\";i:1;s:8:\"username\";i:2;s:5:\"email\";i:3;s:7:\"regdate\";i:4;s:10:\"lastactive\";i:5;s:7:\"postnum\";i:6;s:8:\"controls\";}', 'a:0:{}', 'username', 'asc', '20', 'card'
);

MySQL ha dicho: 
#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 ''vid','uid','title','type','visibility','fields','conditions','sortby','sortorde' at line 1 
You have two ''s there
''vid','uid','title','type','visibility','fields','conditions','sortby','sortord​e'

Yeah your error has two single quotes right there. Find out why.
No, I have edit the sql file adding (') to


INSERT INTO mybb_adminviews (vid,uid,title,type,visibility,fields,conditions,sortby,sortorder,perpage,view_type)

and this is the result:


INSERT INTO mybb_adminviews ('vid','uid','title','type','visibility','fields','conditions','sortby','sortord​er','perpage','view_type')

but in phpmyadmin appears this error:

MySQL ha dicho: 
#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 ''vid','uid','title','type','visibility','fields','conditions','sortby','sortord​e' at line 1

with two ''s in vid

what happens? In the sql file i have ('vid' and not (''vid'