Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using aes_decrypt in a select

Status
Not open for further replies.

jemminger

Programmer
Jun 25, 2001
3,453
US
hi all,

using phpMyAdmin 2.6.3-pl1, MySQL 4.1.9-nt

i'm trying to select some encrypted data like so:

SELECT aes_decrypt(
field1, 'mypassword'
) AS foo
FROM table1

and it gives the 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 '( field1, 'mypassword' ) as foo

what am i doing wrong?
it works fine from mysql query browser.

-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
i like your sleeves...they're real big
 
odd... the above is with php 5.0

i tried the same on another machine running
phpMyAdmin 2.6.0
MySQL 4.0.22
php 4.3.4

and all works as expected...



-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
i like your sleeves...they're real big
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top