Hier
PHP-Code:
$pstats_gesamt = mysql_fetch_array(db_query("SELECT COUNT(tan) AS ganzahl, SUM(verdienst) AS gverdienst, SUM(aufendhalt) AS gaufenthalt FROM ".$db_prefix."_gebuchte_werbung WHERE werbeart = 'paidmail' AND menge > 0 AND status = 1 AND verdienst > 0 AND sponsor != '".$_SESSION['uid']."'")) OR die(mysql_error());
und
PHP-Code:
$pstats_uebrig = mysql_fetch_array(db_query("SELECT COUNT(t1.tan) AS uanzahl, SUM(t1.verdienst) AS uverdienst FROM ".$db_prefix."_gebuchte_werbung AS t1 LEFT OUTER JOIN ".$db_prefix."_reloads_mail 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 = 'paidmail' AND t1.menge > 0 AND t1.status = 1 AND t1.verdienst > 0 AND t1.sponsor != '".$_SESSION['uid']."'")) OR die(mysql_error());
müsste sowas wie das hier :-)
PHP-Code:
LEFT JOIN stg_interface t3
ON (t1.sponsor = t3.sponsor AND t3.sonderregel = 0 AND t3.werbeart = "paidmail")
WHERE t3.sonderregel = 0
eingefügt werden... ich bekomme das nicht hin