mysql_num_rows() <-- works but sometimes gives error?
| From: | Phil Schwarzmann | Date: | Wed, 23 Jan 2002 04:44:50 +0000 |
| Subject: | mysql_num_rows() <-- works but sometimes gives error? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-81636@lists.php.net to get a copy of this message | ||
When I use the function "mysql_num_rows()" it will work just fine except
that SOMETIMES I get this error message...
Warning: Supplied argument is not a valid MySQL result resource in
/blahblah/patient/afterpassword.php on line 67
Here is the code...
65 $query = "UPDATE users set password='$newpassword' WHERE username =
'$user'";
66 $result = mysql_query($query);
67 $num_results = mysql_num_rows($result);
what am I doing wrong here??
Thanks!