// heres the way it needs to be I think
if(!define('SALT'))
define('SALT','n7g7b8necefAs5ecrEv3M72ra');
$salt = SALT;
// from my understanding so far , you can't use a wild card in the select because AES_DECRYPT needs to be called inside the query. MySQL is actually doing the processing not PHP.
$result = mysql_query("SELECT id,username,AES_DECRYPT('password','$sql') as PASS FROM accounts");
}