Schmankerl aus dem phpNuke-Code

Begonnen von Andi, 06 Januar 2003, 14:47:08

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 2 Gäste betrachten dieses Thema.

Andi

Das muss ich einfach mal loswerden. Betrifft modules/sections/index.php
Aus 3 DB-Abfragen$result = sql_query("select secname from ${prefix}_sections where secid=$secid", $dbi);
list($secname) = sql_fetch_row($result, $dbi);
$result = sql_query("select artid, secid, title, content, counter from ${prefix}_seccont where secid=$secid $querylang order by title", $dbi);
$result2 = sql_query("select image from ${prefix}_sections where secid=$secid", $dbi);
list($image) = sql_fetch_row($result2, $dbi);

Mache eine Abfrage:$qry = "SELECT ${prefix}_seccont.artid, ${prefix}_seccont.secid, ${prefix}_seccont.title, ${prefix}_seccont.content, ${prefix}_seccont.counter, ${prefix}_sections.secname, ${prefix}_sections.image
FROM ${prefix}_seccont LEFT JOIN ${prefix}_sections ON ${prefix}_seccont.secid = ${prefix}_sections.secid
WHERE ((${prefix}_seccont.secid=$secid)
$querylang
ORDER BY ${prefix}_seccont.title";
$result = sql_query($qry, $dbi);
schön´s Grüssle, Andi