How to select on passwords?

2005-11-04 Thread Gobi
I was using MySQL 4.1 and have a Users table where I store the UserID 
and the corresponding password using the following:


Insert into Users (UserID, Password) values ('someid', password(somepw));

and when people login, I would query using:

Select * from Users where UserID = 'someid' and Password = password(somepw);

and it would work nicely.  However, I have just recently upgraded to 
5.0.15 to take advantage of the Views and now I found that the above 
Select statement does not return a user record for me anymore.  Am I 
doing something wrong here?


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to select on passwords?

2005-11-04 Thread Gobi

Gobi wrote:

I was using MySQL 4.1 and have a Users table where I store the UserID 
and the corresponding password using the following:


Insert into Users (UserID, Password) values ('someid', password(somepw));

and when people login, I would query using:

Select * from Users where UserID = 'someid' and Password = 
password(somepw);


and it would work nicely.  However, I have just recently upgraded to 
5.0.15 to take advantage of the Views and now I found that the above 
Select statement does not return a user record for me anymore.  Am I 
doing something wrong here?


I realized what my error is.  Password() in 5.0 has been upgraded to 
increase security so I needed to lengthen my password field to include 
the extra bits.  But I am using MD5 now as recommended by MySQL 
documentation.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]