People,

 I have two blocks for phpnuke 6.5.

These blocks show registers inside one marquee, of the left for the right.

The first block is functioning normally. However, if I make some alterations
in it, so that it pass to show registers of another table, it does not
function and presents the error described after thise codes (in the end of
this message).

I consulted several experts in PHP and them they had not known to say which
is the problem.

Now I am submitting the problem to you!

This is the code that functions funny:

$usemarquee = 1;
$scrolldirection = "left";

global $prefix, $multilingual, $currentlang, $dbi;

if ($multilingual == 1) {
$querylang = "WHERE (alanguage='$currentlang' OR alanguage='')";
} else {
$querylang = "";
}
$content = "<table width=\"100%\" border=\"0\">";

$content .= "<Marquee Behavior=\"Scroll\"Direction=\"$scrolldirection\"
$width=\"100%\" ScrollAmount=\"3\" ScrollDelay=\"90\"
onMouseOver=\"this.stop()\" onMouseOut=\"this.start()\">";

(Line 40) $result = sql_query("select sid, title, comments, counter from
".$prefix."_stories $querylang order by sid ASC limit 0,100", $dbi);

(Line 41) while(list($sid, $title, $comtotal, $counter) =
mysql_fetch_row($result, $dbi)) {

$content .= "<img src=\blocks/images/diamond.gif>&nbsp;<a
href=\"modules.php?name=News&amp;file=article&amp;sid=$sid\"><font
color=\"#096C88\"><b>$title</b></a>&nbsp;";

}

$content .= "</table>";

?>

+++++++++++++++++++++++++++++++++

This is the code that does not function (see that I made very little
alterations):

$usemarquee = 1;
$scrolldirection = "left";

global $prefix, $multilingual, $currentlang, $dbi;

$sql = "DELETE FROM ".$prefix."_anuncios WHERE datafim<NOW()";
sql_query($sql, $dbi);

if ($multilingual == 1) {
$querylang = "WHERE (alanguage='$currentlang' OR alanguage='')";
} else {
$querylang = "";
}

$content = "<table width=\"100%\" border=\"0\">";

$content .="<center> <STYLE=\"text-decoration: none\"><font
color=\"#666666\"><b>Últimos 10 Concursos</b></center>";

$content .= "<Marquee Behavior=\"Scroll\" Direction=\"$scrolldirection\"
$width=\"100%\" ScrollAmount=\"3\" ScrollDelay=\"90\"
onMouseOver=\"this.stop()\" onMouseOut=\"this.start()\">";

(Linha 40) $result = sql_query("SELECT categoria, nombre FROM
".$prefix."_anuncios ORDER BY RAND() LIMIT 0,30", $dbi);

(Linha 41) while (list($categoria, $nombre) = mysql_fetch_row($result,
$dbi)) {

$content .= "<img src=blocks/images/diamond.gif>&nbsp;<a
href=\"modules.php?name=Concurso\"><font color=\"#096C88\"><b>$categoria
<br> $nombre</b></a>&nbsp;";

}

$content .= "</table>";

?>

+++++++++++++++++++++++++

This is the error message showed:

Warning: Wrong parameter count for mysql_fetch_row() in
f:\webdoc\html\blocks\block-Concurso.php on line 41

Thanks very much

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