PDA

View Full Version : help mysql password()



yyb
01-07-2007, 05:58 PM
Hi

I'm having problems with bluehost's mysql password() function if I execute following SQL query on 'admins' table with two fields/columns 'username' and 'passwd':

insert into admins values ('user',password('4321'));

it would show one row inserted, and if I try to search such username and password:

select * from admins where username = 'user' and passwd=password('4321');

it would output "MySQL returned an empty result set (i.e. zero rows). (Query took 0.0006 sec)" ?? It works and outputs 'one row found' if I just query on the username='user' without the password part.

Thanks in advance,