Page 1 of 1

Best Function to use to compare passwords in MySQL?

PostPosted: 29. January 2008 06:17
by wasabihowdi
Hi~

I would like to know what is the best function to use for MySQL in order to compare, let's say, the user password with the ones stored in the tables? Should I use the function "LIKE"? (in my case, password is a string - contain both numbers and letters). Or, it will be better to do it in PHP?

Thanks so much! ^^

Howdi

PostPosted: 29. January 2008 11:26
by Scory
Why not simply use the '=' Operator?

Select blabla from table WHERE user = 'username' AND password = 'slfkhjlsdjklksjdf'