EDITED TO ADD MORE INFO
I need to use mysql's md5 function to select an item using it's id field (
). I have a separate database from my users called
that has an md5 hashed value of the user id in it and a time stamp.
Currently the users visit a link like this:
Then the system takes that
from the url and checks if it exists in the
and if it does it lets them recover the account. There's some other stuff for security and whatnot but I do not store the user id in the
, just the MD5 value of it. I use the following to do that:
Now I need to check the users database and get the REAL account id using the md5 value I have saved. I was using the following query to do this:
$query = "SELECT uid FROM users where md5(90*13/12*56+uid)='".$md5accID."'";
Unfortunately this is returning no results. Is there any way to get the real user id from the
database using the md5 version of it from the
? I want to avoid storing the user id in the
if I can.