Hoi
Du kann nicht zwei seperate Selectanweisungen in einen Query packen, dass geht in die sprichwörtliche Hose.
Haste ma ins Newsmodul geschaut? Da ist nen vergleichbarer DB-Query drin:
$qry = "SELECT s.sid, s.informant, s.title, s.hometext, s.bodytext, s.comments, s.counter, s.notes, s.time, s.alanguage, s.acomm, s.aid, s.score, s.ratings, s.topic, t.topicname, t.topicimage, t.topictext, c.catid, c.title AS cattitle, a.url, a.email
FROM ((${prefix}_stories AS s
LEFT JOIN ${prefix}_stories_cat AS c ON s.catid = c.catid)
LEFT JOIN ${prefix}_topics AS t ON s.topic = t.topicid)
LEFT JOIN ${prefix}_authors AS a ON s.aid = a.aid
WHERE " . $where . "
ORDER BY s.time DESC, s.sid DESC
LIMIT " . $offset . "," . $storynum . ";";
Wenn ich das auf Deinen Code (aus dem angehangenen Block), dann müßte es damit funktionieren:
$qry = "SELECT s.sid, cat.catid, aid, s.title, time, DATE_ADD(time, INTERVAL 2 DAY) AS expire, now() AS jetzt, hometext, bodytext, comments, s.counter, s.topic, informant, notes, acomm, cat.title AS title1, t.topicname, t.topicimage, t.topictext
FROM (${prefix}_stories AS s
LEFT JOIN ${prefix}_stories_cat AS cat ON s.catid = cat.catid)
LEFT JOIN ${prefix}_topics AS t ON s.topic = t.topicid
WHERE (ihome='0' OR s.catid='0') AND time <= now() $querylang
ORDER BY s.time DESC, s.sid DESC
limit 0,$storynum";
Probier das mal aus ... ich hab's jetzt nicht getestet.
