ramli Posted January 29, 2007 Share Posted January 29, 2007 I want to select multiple mysql encryted and non-encrypted values and decrypt them for usage:[code]$Query = mysql_query("SELECT AES_DECRYPT(adres,'$key'), AES_DECRYPT(zipcode,'$key'), * FROM userspersonal WHERE ID ='$relationid'"); while($r = mysql_fetch_array($Query)){$adresdb = $r['adres'];echo($adresdb);}[/code]As you can see i want to select two values and decrypt them and then i want to select the remaining fields in de table. Then i use mysql_fetch_array to put them i a array. I dont seem to get it to work, any help pleace ? Quote Link to comment Share on other sites More sharing options...
artacus Posted January 30, 2007 Share Posted January 30, 2007 Yeah you just can't use * when you have other fields listed. Do this:[code]$Query = mysql_query("SELECT AES_DECRYPT(adres,'$key'), AES_DECRYPT(zipcode,'$key'), up.* FROM userspersonal AS up WHERE ID ='$relationid'"); while($r = mysql_fetch_array($Query)){$adresdb = $r['adres'];echo($adresdb);}[/code] Quote Link to comment Share on other sites More sharing options...
fenway Posted January 30, 2007 Share Posted January 30, 2007 Actually, you can, it just has to be first. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.