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>&nbsp;<a
href=\"modules.php?name=Concurso\"><font color=\"#096C88\"><b>$categoria
</b> $nombre</a>&nbsp;";
}

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>&nbsp;<a
href=\"modules.php?name=Concurso\"><font color=\"#096C88\"><b>$categoria
</b> $nombre</a>&nbsp;";
}

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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to