phpMyAdmin problem

This is a discussion on phpMyAdmin problem within the PHP Language forums, part of the PHP Programming Forums category; Hello, I am having a problem with a query in phpMyAdmin... it works fine on my localhost, but the exact ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-03-2006
Marcus
 
Posts: n/a
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 (permalink)  
Old 07-03-2006
Rik
 
Posts: n/a
Default Re: phpMyAdmin problem

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


Reply With Quote
  #3 (permalink)  
Old 07-03-2006
Erwin Moller
 
Posts: n/a
Default Re: phpMyAdmin problem

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...
Reply With Quote
  #4 (permalink)  
Old 07-03-2006
Marcus
 
Posts: n/a
Default Re: phpMyAdmin problem

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?
Reply With Quote
  #5 (permalink)  
Old 07-03-2006
Marcus
 
Posts: n/a
Default Re: phpMyAdmin problem

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
Reply With Quote
  #6 (permalink)  
Old 07-04-2006
Erwin Moller
 
Posts: n/a
Default Re: phpMyAdmin problem

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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:46 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0