If user_id and passwd are fields in your table and the passwd field is
encrypted :
SELECT user_id FROM user WHERE passwd = PASSWORD('plaintext_user_pass')


> -----Original Message-----
> From: Ramiro Varandas Jr [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, April 02, 2002 11:49 AM
> To:   [EMAIL PROTECTED]
> Subject:      Password function
> 
>  I think that this question might be kinda of stupid for all of you but I 
> couldn't find a good answer... When we use the MySQL internal function - 
> Password('string') - MySQL inserts that string codified into the database,
> so 
> that people that look for that doesn't know the real password. But i have
> a 
> client that have a website and in the table of customers I'd like to use
> that 
> function to make it more secure, but when I do that, I can't authenticate
> the 
> user anymore, because if i write:
> 
>   SELECT user_id FROM user WHERE user_pass = 'my_var'
> 
>  It doesn't return me a user... but it's there, registered...
>  Is there a way to do that or no... if there is, something give me a
> hint...
>  My client's website is running in a Windows 2000 server but the MySQL
> server 
> is runnig in a linux machine.
> 
>   Regards,
>   Ramiro Jr.

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to