Brian Rue wrote:
> Hi,
>
> I'm getting the error
> <<Warning: Supplied argument is not a valid MySQL result resource>>
>
> from this code:
>
> function validateUser($username,$password) {
> $conn = connectToMySQL();
> mysql_select_db($db_name,$conn);
> $query="select * from members where username='".$username."' AND
> password='".$password."'";
> $result = mysql_query($query,$conn);
> if (mysql_num_rows($result) != 0) { //*this is the line that returns the
> error*
> return true;
> } else {
> return false;
> }
> }
>
> I've checked that the connection works, and that the query is what it should
> be, and the query works when I type it into the terminal. Any ideas?
>
> Thanks,
> Brian Rue
>
>
>
I suppose it is fixed in 4.1.1-dev.
--
Yasuo Ohgaki
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]