Support

Admin Tools

#30073 mysql query into script

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by tampe125 on Friday, 10 August 2018 09:04 CDT

toonetcreation
Hi,

I want to do a SQL query from shell script but I get an issue.
From phpMyAdmin interface, the sql query works fine (see screen shot attached).
But when I launch it from shell script, sql query retreive this error message :

ERROR 1064 (42000) at line 1: 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 'key = 'superuserslist'' at line 1

See attached TXT file for query build into the script.

Do you have an idea why?

Thanks
laurent

tampe125
Akeeba Staff
Hello,

key is a reserved work in MySQL, you have to escape column named wrapping them in backticks `
That's why in PhpMyAdmin it's working fine, it automatically quotes your table and column names.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

toonetcreation
I dit this (see attached file) and I get this message :

ERROR 1064 (42000) at line 1: 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 '= 'cparams'' at line 1

tampe125
Akeeba Staff
I tried to run that SQL and it's actually correct.
I'm sorry but I can't help you with it, try to put it into a file and execute the SQL from there.

Since this is not related to Akeeba software we can only offer very limited support.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!