Re: mysql_query troubles
| From: | Steve Brett | Date: | Wed, 18 Jul 2001 09:27:12 +0000 |
| Subject: | Re: mysql_query troubles | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-10543@lists.php.net to get a copy of this message | ||
> Hi all',
> I have a mysql_query that reads:
>
> $testResult = mysql_query("SELECT * FROM login_table where Pass =
> password('$password')") or die ("ouch");
>
is $password the var that stores the password ? i don't understand why you
have password('$password')
$testResult = mysql_query("SELECT * FROM login_table where Pass =
$password") or die ("ouch");
should do it.
Steve
> $num_rows = mysql_num_rows($testResult);
>
>
> the problem is that I keep getting a value of 0 for $num_rows when I know
> the table has 1 entry for PAss which equals password('$password'). The
> password I have used is just 'a' (before pasing throught the password
> function in the insert).
>
>
> I DO have a table named login_table
> I KNOW that there is an entry that matches 'password('$password)'.. ( i
> checked using phpMyAdmin)
>
>
> can anyone help??????
>
>
> Thanks in advance,
> brad
>