Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Elxis 5.5 Calypso supports 2 factor authentication login with e-mail or SMS.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
FAQs
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
SQL backup from Elxis backend
« previous
next »
Print
Pages: [
1
]
Author
Topic: SQL backup from Elxis backend (Read 43990 times)
Ivan Trebješanin
Elxis Team
Hero Member
Posts: 1663
SQL backup from Elxis backend
«
on:
May 12, 2007, 02:51:53 »
Hi,
I didn't want to bother anyone, but this is what I get everytime I try to import SQL dump I made from admin panel. First two times I was thinking that I'm doing something wrong, but this is the third time, so I want to know if someone have imported SQL dump and how? Below is the text I get from phpmyadmin.
SQL query:
INSERT INTO elx_components( id, name, link, menuid, parent, admin_menu_link, admin_menu_alt,
OPTION , ordering, admin_menu_img, iscore, params )
VALUES (
"1", "Banners", "", "0", "0", "", "Banner Management", "com_banners", "0", "js/ThemeOffice/component.png", "0", ""
);
MySQL said: Documentation
#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 'option,ordering,admin_menu_img,iscore,params) VALUES ("1","Banners","","0","0","' at line 1
«
Last Edit: May 12, 2007, 12:56:55 by Ivan Trebješanin
»
Logged
I've got a snap in my finger...
Got rhythm in my walk...
datahell
Elxis Team
Hero Member
Posts: 10356
SQL import fix
«
Reply #1 on:
May 12, 2007, 10:46:38 »
We have discussed this issue in the past.
You must surround the word "option" in backticks (`). "option" is a reserved word in mysql and that's why creates problems parsing the sql file. So, you must edit the sql file and do the replacements before trying to import it.
Example:
INSERT INTO elx_components( id, name, link, menuid, parent, admin_menu_link, admin_menu_alt,
`option`, ordering, admin_menu_img, iscore, params )
You can also add backticks to all other column names if you wish.
To fix this issue in Elxis 2006.4 do the following
Open /administrator/components/com_database/drivers/mysql.php
Go to line 139.
Replace this:
$temp_sql.=' ('.@implode(',',$fields).')';
with this:
$temp_sql.=' (`'.@implode('`,`',$fields).'`)';
Save the file. Done!
Create a new backup file. That file can be imported without errors.
This fix has already been applied to Elxis 2007
«
Last Edit: May 12, 2007, 11:05:03 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Ivan Trebješanin
Elxis Team
Hero Member
Posts: 1663
Re: SQL backup???
«
Reply #2 on:
May 12, 2007, 12:56:25 »
Thank you, so much datahell,
I'm really embarrassed to bother you, You've helped me a few times already, and I know you're so busy right now. I hope I will be able to return this favour sometime.
Logged
I've got a snap in my finger...
Got rhythm in my walk...
datahell
Elxis Team
Hero Member
Posts: 10356
Re: SQL backup??? [SOLVED]
«
Reply #3 on:
May 12, 2007, 13:16:37 »
No one forces me to reply. I reply because I want to help people that honoured us by using Elxis. Don't hesitate to ask and please don't say that you bother me.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
FAQs
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
SQL backup from Elxis backend