Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > phpMyAdmin problem
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 7th March 22:25
marcus
External User
 
Posts: 1
Default phpMyAdmin problem



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.
  Reply With Quote


 


2 7th March 22:26
rik
External User
 
Posts: 1
Default phpMyAdmin problem



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

Grtz,
--
Rik Wasmus
  Reply With Quote
3 7th March 22:26
erwin moller
External User
 
Posts: 1
Default phpMyAdmin problem


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...
  Reply With Quote
4 9th March 10:36
marcus
External User
 
Posts: 1
Default phpMyAdmin problem


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?
  Reply With Quote
5 9th March 10:36
marcus
External User
 
Posts: 1
Default phpMyAdmin problem


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
  Reply With Quote
6 12th March 13:53
erwin moller
External User
 
Posts: 1
Default phpMyAdmin problem


Aha, ok, I didn't know that.

I think you are probably right about phpMyAdmin

Nope. :-/

Good luck,

Erwin Moller
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666