I may be missing something here but why are you only selecting when there is no data? Should it be like this:
PHP Code:
//############### start advertising / sponsorship banner #############
$showad = $DB_site->query_first("SELECT * FROM ads WHERE forumidnum='$forumid'");
if (!empty($showad[forumidnum]) or $showad[forumidnum] =="") {
$randomad=$DB_site->query("SELECT * FROM ads ORDER BY RAND() desc LIMIT 1");
eval("\$showthisad .= \"".gettemplate("ads_bannerbank")."\";");
} else {
eval("\$showthisad .= \"".gettemplate("ads_forum_sponsor")."\";");
}
That's what doesn't make sense to me :s
- miSt