Hab es bei mir so gemacht vieleicht hilft es dir ja
Code:
<?
$forcedbanner = mysql_num_rows(db_query("SELECT t1.tan FROM ".$db_prefix."_gebuchte_werbung AS t1 LEFT OUTER JOIN ".$db_prefix."_reloads AS t2 ON (t2.tan = t1.tan AND (t2.uid = ".$_SESSION['uid']." OR t2.ip = '".$ip."') AND t2.bis >= '".time()."') WHERE t2.tan IS NULL AND t1.werbeart = 'forcedbanner' AND t1.menge > 0 AND t1.status = 1 AND t1.verdienst > 0 AND t1.sponsor != '".$_SESSION['uid']."'"));
?>
Code:
Paidbanner (<?=$forcedbanner;?>)
Müsstest es dir vieleicht ein bisschen anpassen.