Re: mysql_num_rows error
| From: | David Robley | Date: | Wed, 09 Oct 2002 03:28:54 +0000 |
| Subject: | Re: mysql_num_rows error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119383@lists.php.net to get a copy of this message | ||
In article <20021008145810.74985.qmail@pb1.pair.com>,
omar_campos@compusoluciones.com says...
> I have a file. I'll paste from line 32 to 34
>
> <?
> .....
> $sql = "select USUARIO from docente where USUARIO = '$usuario'";
> $result = mysql_query($sql, $link);
Replace the above line with (all on one line)
$result = mysql_query($sql, $link) or die("Error: " .
mysql_error()."<BR>Query: ".$sql);
> if (mysql_num_rows($result) == 1) { // line 34
> ....
> ?>
>
> I get the next warning:
> Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
> resource in /home/olimpiad/public_html/base/alta1.php on line 34
>
> I'm running the script on a linux server.
> could someone help me.
> Thank you.
And when you get the error message, you will have the actual query to
check.
Cheers
--
David Robley
Temporary Kiwi!
Quod subigo farinam