Re: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.....\none.php on line 286
| From: | Marcelo Luiz de Laia | Date: | Mon, 09 Jun 2003 21:59:10 +0000 |
| Subject: | Re: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.....\none.php on line 286 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-150810@lists.php.net to get a copy of this message | ||
Hi Philip and Thomas and All.
Thanks very much for yours helps.
I am Brazillian and I speak in portuguese, for this, I am sorry very much
for my bad english.
After a long time, my code works very good! But, I dont understand what was
the problem!
My code was:
$result = sql_query("select categoria, nombre, datafim from
".$prefix."_anuncios order by datafim limit 0,30", $dbi);
while (list($categoria, $nombre) = sql_fetch_row($result, $dbi)) {
$content .= "<img src=blocks/images/diamond.gif> <a
href=\"modules.php?name=Concurso\"><font
color=\"#096C88\"><b>$categoria
</b> $nombre</a> ";
}
and dont works.
If I change it for:
//$result = sql_query("select categoria, nombre, datafim from
".$prefix."_anuncios order by datafim limit 0,30", $dbi);
$sql = "select categoria, nombre, datafim from ".$prefix."_anuncios order by
datafim limit 0,30";
while (list($categoria, $nombre) = sql_fetch_row($result, $dbi)) {
$content .= "<img src=blocks/images/diamond.gif> <a
href=\"modules.php?name=Concurso\"><font
color=\"#096C88\"><b>$categoria
</b> $nombre</a> ";
}
It works very good!
My question:
In while instruction have a $result and $dbi. They dont are necessary in the
sql_query? Understand me?
Marcelo
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 5/6/2003