Part of the code I'm using is:
$password = MD5($password);
$account_created = date("Y-m-d H-i-s");
db_insert("users","user_id,username,password,account_created,registration_ip","ENCRYPT('$_POST[username] $account_created'),'$_POST[username]',MD5('$_POST[password]'),'$account_created','$_SERVER[REMOTE_ADDR]'");
$user = db_get_array("users","username='$_POST[username]'");
db_insert("usersettings","user_id,timezone","'$user[user_id]','$_POST[timezone]'");
db_update("users","login_id = ENCRYPT('$user[username] $password')","user_id='$user[user_id]'");
The script continues before and after that
Anyway, the problem I'm having is that, there are two calls to ENCRYPT() in the MySQL queries, but for some reason both of them have the same values
The user ID and login ID are meant to be different, whats the problem?