Hello, thanks for the suggestions so far but...

mysql> select * from access where UserID='myusername' and Password =
password('mypassword');
Empty set (0.00 sec)

mysql> select * from access where UserID='myusername' and
password('mypassword');
returns correct result...

mysql> select * from access where UserID='myusername' and
password('wrongpassword'); 
returns correct result (same result as returned in the previous select)

which brings me to the realization that:
select * from access where UserID='myusername' and password('mypassword');
does not work! it's not checking for the correct password

Any and all help will be greatly appreciated.

-----Original Message-----
From: Georg Richter [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 12, 2002 11:58 PM
To: [EMAIL PROTECTED]
Subject: Re: Password=password('mypassword')


Hi,

> Why does select * from usertable where user=username and Password =
> password('passowrd') not worked?
>

You should quote the username, and fix the typo in 'passowrd'.

select * from usertable where user=username and password('password') does
work, but that only checks if user exists and doesn't check for the correct
password...

Same here, quote the username and set the Password field in the where
clause.

Regards

Georg

mysql,query

---------------------------------------------------------------------
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

---------------------------------------------------------------------
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