2008年12月18日星期四

[fw-db] Mysql PDO: Selecting DES encrypted fields

Hey,
I have searched and have not found any discussion about this. I'm attempting
to select fields that were encrypted with DES_ENCRYPT for example:

$d = $db->fetchRow("SELECT
DES_DECRYPT(street_address),city,state,zip_code,orderID FROM registration
WHERE orderID=?", array($OrderID));
print_r($d);

Prints out:

Array
(
[DES_DECRYPT(street_address)] =>
[city] => TestCity
[state] => IL
[zip_code] => 12345
[orderID] => 326829
)

So the unencrypted fields are returned correctly, but the DES_DECRYPT fields
are always empty. Has anyone had any luck using DES encryption with Zend_DB?

Thanks
--
View this message in context: http://www.nabble.com/Mysql-PDO%3A-Selecting-DES-encrypted-fields-tp21077365p21077365.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: