By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,480 Members | 755 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,480 IT Pros & Developers. It's quick & easy.

phpMyAdmin problem

P: n/a
Hello,

I am having a problem with a query in phpMyAdmin... it works fine on my
localhost, but the exact same query produces an error in phpMyAdmin on
my server:

localhost: PHP 4.3.11, MySQL 4.1.12, phpMyAdmin 2.8.1
server: PHP 4.3.11, MySQL 4.1.12, phpMyAdmin 2.6.3-pl1

SELECT AES_DECRYPT(pass, 'asdf') FROM `test`

This query works fine on my local phpMyAdmin, and also works fine
through a php script on my server, but when I try it with phpMyAdmin on
my server it produces the following 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 '( pass , 'asdf' ) FROM `test` LIMIT 0, 30' at line 1

The only thing I could find online was that this error might arise if
there is a space between AES_DECRYPT and (, but obviously there isn't in
this case, so I am stumped. I have been copy/pasting so I know the
query is the same. Thanks a lot for your help.
Jul 3 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Rik
Marcus wrote:
Hello,

I am having a problem with a query in phpMyAdmin... it works fine on
my localhost, but the exact same query produces an error in
phpMyAdmin on my server:

localhost: PHP 4.3.11, MySQL 4.1.12, phpMyAdmin 2.8.1
server: PHP 4.3.11, MySQL 4.1.12, phpMyAdmin 2.6.3-pl1

SELECT AES_DECRYPT(pass, 'asdf') FROM `test`

What does this do?
SELECT AES_DECRYPT(`pass`, 'asdf') FROM `test`

Grtz,
--
Rik Wasmus
Jul 3 '06 #2

P: n/a
Marcus wrote:
Hello,

I am having a problem with a query in phpMyAdmin... it works fine on my
localhost, but the exact same query produces an error in phpMyAdmin on
my server:

localhost: PHP 4.3.11, MySQL 4.1.12, phpMyAdmin 2.8.1
server: PHP 4.3.11, MySQL 4.1.12, phpMyAdmin 2.6.3-pl1

SELECT AES_DECRYPT(pass, 'asdf') FROM `test`

This query works fine on my local phpMyAdmin, and also works fine
through a php script on my server, but when I try it with phpMyAdmin on
my server it produces the following 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 '( pass , 'asdf' ) FROM `test` LIMIT 0, 30' at line 1

The only thing I could find online was that this error might arise if
there is a space between AES_DECRYPT and (, but obviously there isn't in
this case, so I am stumped. I have been copy/pasting so I know the
query is the same. Thanks a lot for your help.
Hi,

I think pass should be a string.
Does:
SELECT AES_DECRYPT('pass', 'asdf') FROM `test`
also produce an error?

Regards,
Erwin Moller

PS: Beats me why direct executing does not produce an error.
PHPMyAdmin must be fiddling around before executing...
Jul 3 '06 #3

P: n/a
Erwin Moller wrote:
Hi,

I think pass should be a string.
Does:
SELECT AES_DECRYPT('pass', 'asdf') FROM `test`
also produce an error?

Regards,
Erwin Moller

PS: Beats me why direct executing does not produce an error.
PHPMyAdmin must be fiddling around before executing...
Erwin,

Thanks, but 'pass' shouldn't be the string, because in this case it is
the name of the column. I think you are probably right about phpMyAdmin
fiddling around, but I am not aware of any differences between the 2
versions that would cause this. Any other ideas?
Jul 3 '06 #4

P: n/a
Rik wrote:
>
What does this do?
SELECT AES_DECRYPT(`pass`, 'asdf') FROM `test`

Grtz,
Rik,

Thanks for the feedback, your thought was a good one but unfortunately
didn't work when I tried it. I get the same message, just now with the
back ticks:

#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 '( `pass` , 'asdf' ) FROM test LIMIT 0, 30' at line 1
Jul 3 '06 #5

P: n/a
Marcus wrote:
Erwin Moller wrote:
>Hi,

I think pass should be a string.
Does:
SELECT AES_DECRYPT('pass', 'asdf') FROM `test`
also produce an error?

Regards,
Erwin Moller

PS: Beats me why direct executing does not produce an error.
PHPMyAdmin must be fiddling around before executing...

Erwin,
Hi Marcus,
>
Thanks, but 'pass' shouldn't be the string, because in this case it is
the name of the column.
Aha, ok, I didn't know that.

I think you are probably right about phpMyAdmin
fiddling around, but I am not aware of any differences between the 2
versions that would cause this. Any other ideas?
Nope. :-/

Good luck,

Erwin Moller

Jul 4 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.