Posted by LJB on 11/18/79 11:43
If you do not have a valid resource you will always get an error.
Try catching your resource in an "if" statement.
If($rs) {
do this....
} else {
do something else...
}
If nothing is selected and there are no matching rows you will
not get a valid resource.
Oli Filth wrote:
> Fish44 wrote:
>
>>Ive got the following code which works great on my localserver, but
>>when i upload it to my service provider i get an error
>>
>>"Warning: mysql_num_rows(): supplied argument is not a valid MySQL
>>result resource in /opt2/home3/mitas/public_html/register.php on line
>>86
>
>
> It means it exactly what it says - $rs is not a valid resource, which
> means the line that gives $rs has failed.
>
> echo mysql_error() after every MySQL call, to find out what the problem
> is.
>
>
> P.S. You probably want to put quotes around the e-mail address in the
> query, and also call mysql_real_escape_string() on $eMail.
>
[Back to original message]
|