Page 1 of 1

mysql PASSWORD()

PostPosted: 10. September 2008 22:00
by bludshot
I use the mysql PASSWORD() function in my code like this:

$sql = "SELECT username, uid
FROM users
WHERE username = '$userId' AND password = PASSWORD('$password')";

Can you use this in xampp? I'm just wondering because somehow it's not working right and I was wondering if this should work properly in xampp.

PostPosted: 10. September 2008 22:06
by bludshot
lol, solved it already.

See I'm moving an app that was on a 1&1 host, to my local host (xampp). On 1&1 my password field was char(32). And I think it was storing 16 character hashes (or maybe 32, I don't know). Because the mysql they have there uses 16 or 32 (probably 16) character hashes.

But the mysql with xampp uses 41 character hashes so I had to change the field to char(41)