sabret00the
07-23-2004, 02:54 PM
what am i doing wrong this won't work
$forumlist=$DB_site->query_first("
SELECT *
FROM forum
WHERE threadcount > 0
AND forumid NOT IN (11,16,42,46,47,1,13,38,53,90,92,95)
AND parentid NOT IN (2,10,13,19,70,16,33,24,49,53,79,96)
ORDER BY RAND()
");
// $resultlatest = mysql_query($query,$db);
$counted = 0;
while ($forumlist_array = $DB_site->fetch_array($forumlist))
{
$forumlist_array['title'] = nl2br(stripslashes($forumlist_array['title']));
$forumlist_array['description'] = nl2br(stripslashes($forumlist_array['description']));
$forumlist_array['forumid'] = number_format($forumlist_array['forumid']);
extract($forumlist_array);
eval('$siteindex_forumlistbit .= "' . fetch_template("siteindex_forumlistbit") . '";');
$counted++;
if ( $counted == 5 ) {
break;
}
}the query works perfectly but it all goes wrong in the while
$forumlist=$DB_site->query_first("
SELECT *
FROM forum
WHERE threadcount > 0
AND forumid NOT IN (11,16,42,46,47,1,13,38,53,90,92,95)
AND parentid NOT IN (2,10,13,19,70,16,33,24,49,53,79,96)
ORDER BY RAND()
");
// $resultlatest = mysql_query($query,$db);
$counted = 0;
while ($forumlist_array = $DB_site->fetch_array($forumlist))
{
$forumlist_array['title'] = nl2br(stripslashes($forumlist_array['title']));
$forumlist_array['description'] = nl2br(stripslashes($forumlist_array['description']));
$forumlist_array['forumid'] = number_format($forumlist_array['forumid']);
extract($forumlist_array);
eval('$siteindex_forumlistbit .= "' . fetch_template("siteindex_forumlistbit") . '";');
$counted++;
if ( $counted == 5 ) {
break;
}
}the query works perfectly but it all goes wrong in the while