At 9:30 PM -0400 6/16/01, William Wong wrote:
> > >PHP4> mysql_query("select * from user where username='myname' and
>> Define "doesn't work". Fails to return rows? PHP generates an error
>Sorry bout that. Yes it doesn't return any rows despite the fact that the
>correct username and password are entered.
>The user/pass was entered with the following query:
>PHP4> $result = mysql_query("insert into user values ('$username',
>> The statement is therefore equivalent to:
>> select * from user where username='myname'
>Oh. I'm trying to implement authentication. So I guess this is quite bad
>I'm still not sure why my original query (with passwd = ) isn't returning
>any rows. Is there something wrong with the syntax?
Looks correct to me. Try running this query from the mysql program
to verify that you're really matching the password of some entry:
mysql> SELECT *, password('mypass') FROM user;
Paul DuBois, paul@stripped