Dann wohl eher ein Syntax Fehler, poste mal deine geänderten Zeilen hier.
Dann wohl eher ein Syntax Fehler, poste mal deine geänderten Zeilen hier.
Kill one man, and you are a murderer.
Kill millions of men, and you are a conqueror.
Kill them all, and you are a god. - Jean Rostand, Thoughts of a Biologist (1939)
also hier die grund zeilen
PHP-Code:
$max = mysql_fetch_array(db_query ("SELECT ".$db_feld." FROM ".$db_prefix."_userdaten WHERE uid = '".$_SESSION['uid']."' LIMIT 1"));
hier meine ideePHP-Code:
$pmail = db_query("SELECT t1.* FROM ".$db_prefix."_gebuchte_werbung AS t1 LEFT JOIN ".$db_prefix."_reloads_mail AS t2 ON (t1.tan = t2.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 ORDER BY t1.verdienst DESC LIMIT ".$max[$db_feld]."") OR die(mysql_error());
PHP-Code:
$max = mysql_fetch_assoc(db_query ("SELECT ".$db_feld.", var, vonu FROM ".$db_prefix."_userdaten WHERE uid = '".$_SESSION['uid']."' LIMIT 1") echo mysql_error());
und hier die codes von sotierungPHP-Code:
$pmail = db_query("SELECT t1.* FROM ".$db_prefix."_gebuchte_werbung AS t1 LEFT JOIN ".$db_prefix."_reloads_mail AS t2 ON (t1.tan = t2.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'].' ORDER BY t1.'.$usr['var'].' '.$usr['vonu'].' LIMIT ".$max[$db_feld]."") echo mysql_error());
PHP-Code:
$usr = mysql_fetch_assoc (db_query ('SELECT max_forced, var, vonu FROM '.$db_prefix.'_userdaten WHERE uid = '.$_SESSION['uid'].' LIMIT 1'));
PHP-Code:
ON (t1.tan = t2.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'].' ORDER BY t1.'.$usr['var'].' '.$usr['vonu'].' LIMIT '.$usr['max_forced'].'');
Da ist ein Fehler drin:
Das '= sollte denke ich ein != seinAND t1.sponsor '= '.$_SESSION['uid'].'
Und du musst aufpassen, wenn der gesamte String in " (doppelten) steht, dann müssen die Vars am besten auch da rein:
PHP-Code:
$pmail = db_query("SELECT t1.* FROM ".$db_prefix."_gebuchte_werbung AS t1 LEFT JOIN ".$db_prefix."_reloads_mail AS t2 ON (t1.tan = t2.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']." ORDER BY t1.".$usr['var']." ".$usr['vonu']." LIMIT ".$max[$db_feld]." ") echo mysql_error());
Kill one man, and you are a murderer.
Kill millions of men, and you are a conqueror.
Kill them all, and you are a god. - Jean Rostand, Thoughts of a Biologist (1939)
klappt leider auch nicht selbe bild wie immer
sorry für doppel post
wollte ma informieren also das $max funktioniert nach dem einfügen
nur das $pmail nicht hatte auch schon getesttet statt $usr weiter hinten zu nehm $max hat leider nix gebracht..
den gesdanken gang hate ich weil ja oben normal laut beschreibung $usr steht bitte für jede idee offen
Hab mal weiter getstet es so eingetragenund eine fehler meldung bekommenPHP-Code:
$pmail = db_query('SELECT t1.* FROM '.$db_prefix.'_gebuchte_werbung AS t1 LEFT JOIN '.$db_prefix.'_reloads_mail AS t2 ON (t1.tan = t2.tan AND (t2.uid = '.$_SESSION['uid'].' OR t2.ip = "'.$ip.'") AND t2.bis >= '.time().') WHERE (t2.tan IS NULL AND t1.werberart = "paidmail" AND t1.menge > 0 AND t1.status = 1 AND t1.verdienst > 0 AND t1.sponsor != '.$_SESSION['uid'].' ORDER BY t1.'.$usr['var'].' '.$usr['vonu'].' LIMIT '.$usr['max_forced']) OR die(mysql_error());
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY t1.verdienst DESC LIMIT 25' at line 1
versuchs mal so:
die Werte werden richtig übergeben, das siehst man an der Fehlermeldung.PHP-Code:
$pmail = db_query('SELECT t1.* FROM '.$db_prefix.'_gebuchte_werbung AS t1 LEFT JOIN '.$db_prefix.'_reloads_mail AS t2 ON (t1.tan = t2.tan AND (t2.uid = '.$_SESSION['uid'].' OR t2.ip = "'.$ip.'") AND t2.bis >= '.time().') WHERE (t2.tan IS NULL AND t1.werberart = "paidmail" AND t1.menge > 0 AND t1.status = 1 AND t1.verdienst > 0 AND t1.sponsor != '.$_SESSION['uid'].' ORDER BY t1.'.$usr['var'].' '.$usr['vonu'].' LIMIT '.$usr['max_forced'].'') OR die(mysql_error());
mfg
dragon11