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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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... |
|
|||
|
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? |
|
|||
|
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 |
|
|||
|
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 |