Code:
SELECT c.did, c.cid, c.title e.did, e.aid, e.bid FROM c1 c INNER JOIN e1 e ON c.did = e.did WHERE c.cid > e.aid AND c.cid >e.bid
SELECT c.did, c.cid, c.title e.did, e.aid, e.bid FROM c1 c INNER JOIN e1 e ON c.did = e.did WHERE c.cid > e.aid AND c.cid >e.bid
function DateLister() {
global $cache, $catbit;
if(!isset($cache)) {
$result = mysql_query("SELECT catid, parentid, title FROM DatesCats");
while($row = mysql_fetch_array($result)) {
$cache[$row['parentid']][$row['catid']] = $row;
}
}
if(is_array($cache) && count($cache)) {
reset($cache);
$childlist_count_temp=0;
while(list($key1, $val1) = each($cache[$catbit])) {
while(list($key2, $personenbit) = each($val1)) {
$personen_result = mysql_query("SELECT d.dateid, d.catid, d.title,
d.createtime, e.* FROM Dates d LEFT JOIN VisitParty e ON
(d.dateid=e.dateid) WHERE d.catid='$personenbit[catid]' AND
((e.lastvisit IS NULL OR (d.createtime>e.lastvisit)))");
$newperson=0;
while ($personen_row = mysql_fetch_array($personen_result)) {
$newperson++;
}
if($newperson==0) $b="";
else $b="Neue Person";
$DateAusgabe.=$personenbit['title'].$b
}
}
}
return $DateAusgabe;
}
$result = mysql_query("SELECT catid, parentid, title FROM DatesCats");
SELECT d.dateid, d.catid, d.title, d.createtime,
c.catid, c.parentid, c.title, e.*
FROM (Dates d INNER JOIN DatesCats c ON d.catid=c.catid)
LEFT JOIN VisitParty e ON d.dateid=e.dateid
WHERE e.lastvisit IS NULL OR d.createtime>e.lastvisit
$personen_result = mysql_query("SELECT d.dateid, d.catid, d.title,
d.createtime, e.* FROM Dates d LEFT JOIN VisitParty e ON
(d.dateid=e.dateid) WHERE d.catid='$personenbit[catid]' AND
((e.lastvisit IS NULL OR (d.createtime>e.lastvisit)))");
$newperson=0;
while ($personen_row = mysql_fetch_array($personen_result)) {
$newperson++;
}
if($newperson==0) $b="";
else $b="Neue Person";
$result = mysql_query("SELECT catid, parentid, title FROM DatesCats");
$personen_result = mysql_query("SELECT d.dateid, d.catid, d.title,
d.createtime, e.* FROM Dates d LEFT JOIN VisitParty e ON
(d.dateid=e.dateid) WHERE d.catid='$personenbit[catid]' AND
((e.lastvisit IS NULL OR (d.createtime>e.lastvisit)))");
$newperson=0;
while ($personen_row = mysql_fetch_array($personen_result)) {
$newperson++;
}
if($newperson==0) $b="";
else $b="Neue Person";
if($newperson==0) $b="";
else $b="Neue Person";
SELECT d.dateid, d.catid, d.title, d.createtime,
c.catid, c.parentid, c.title, e.*
FROM (Dates d INNER JOIN DatesCats c ON d.catid=c.catid)
LEFT JOIN VisitParty e ON d.dateid=e.dateid
WHERE e.lastvisit IS NULL OR d.createtime>e.lastvisit
SELECT d.dateid, d.catid, d.title,
d.createtime, e.* FROM Dates d LEFT JOIN VisitParty e ON
(d.dateid=e.dateid) WHERE d.catid='$personenbit[catid]' AND
((e.lastvisit IS NULL OR (d.createtime>e.lastvisit)))
SELECT d.dateid, d.catid, d.title, d.createtime,
c.catid, c.parentid, c.title, e.*
FROM (Dates d INNER JOIN DatesCats c ON d.catid=c.catid)
LEFT JOIN VisitParty e ON d.dateid=e.dateid
WHERE e.lastvisit IS NULL OR d.createtime>e.lastvisit
Kommentar