Re: syntax help
| From: | Daniel Convissor | Date: | Thu, 14 Dec 2000 05:38:52 +0000 |
| Subject: | Re: syntax help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30251@lists.php.net to get a copy of this message | ||
Jack:
> "Waring: 0 (mean zero) is not Mysql result index in ..... line 141"
> ... snip ...
> $resultofrs = mysql_query($queryoffers);
> $numRows = mysql_num_rows($resultofrs);
> if (($numRows) > 0) { file://<--------------This is line 141
> while($row = mysql_fetch_array($resultofrs))
> {
> ....the html bit to display the results found.
> }
> } else {
> echo " not found ";
> }
What's that "file://" doing in there? That could be tripping up the
process. Perhaps try this untested code to solve the problem...
$resultofrs = mysql_query($queryoffers);
if ( @mysql_num_rows($resultofrs) ) {
while ( $row = mysql_fetch_array($resultofrs) ) {
....the html bit to display the results found.
}
} else {
echo " not found ";
}
--Dan
--
PHP scripts that make your job easier
http://www.analysisandsolutions.com/code/
SQL Solution | Layout Solution | Form Solution
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409