Dynamische A-Liste nach keywords im summary feld

Gesperrt
philippe
Beiträge: 18
Registriert: Mo 4. Apr 2005, 12:50
Kontaktdaten:

Dynamische A-Liste nach keywords im summary feld

Beitrag von philippe »

Hallo zusammen!

Vielleciht kann mir jemand aus der Patsche helfen. Ich stehe grad voll auf der leitung. Ich möchte gerne eine Artikelliste machen, die nur die Artikel zeigt, die bestimmtes Stichwort im Summary feld haben.

Dies hat mit diesem Suchmodul super funktioniert indem in die query daruf beschränkt habe. http://contenido.org/forum/viewtopic.php?t=4468

siehe letzte zeile hier:

Code: Alles auswählen

$sql = "SELECT
a.title AS title, a.idart AS idart, a.summary AS comment, a.idartlang AS idartlang,
b.idcat AS idcat,
c.parentid AS parentid,
d.value AS content
FROM 
".$cfg["tab"]["art_lang"]." AS a,
".$cfg["tab"]["cat_art"]." AS b,
".$cfg["tab"]["cat"]." AS c,
".$cfg["tab"]["content"]." AS d
WHERE
a.idart = b.idart AND
a.idartlang = d.idartlang AND
b.idcat = c.idcat AND
c.idclient = '$client' AND
idlang = '$lang' AND
online='1' AND
(a.summary REGEXP '$suchregexp')";

Beim Versuch diesen Ansatz auf dieses Modul anzuwenden bin ich kläglich gescheitert. http://w3concepts.net/1/1/51/87.html

Zum einen weiss ich nicht wo und wie ich ich das summary-feld in die query einfüge und wo ich die bedingung (begriff komm aus input bereich al zusätzliches feld) einfüge. Mein letztes sql-Projekt ist schon ein paar Jahre her :?

danke für jeden tipp

philippe
philippe
Beiträge: 18
Registriert: Mo 4. Apr 2005, 12:50
Kontaktdaten:

erledigt!

Beitrag von philippe »

manchmal sollte man eine mütze schlaf der nachtschicht vorziehen....
war natürlich ganz einfach die query:

Code: Alles auswählen

$query = "SELECT ARTLANG.idart, ARTLANG.idartlang, ARTLANG.summary FROM ".$cfg["tab"]["cat_art"]." AS CATART, ".
          $cfg["tab"]["art_lang"]." AS ARTLANG ".
         "WHERE ARTLANG.summary  REGEXP '$summ' AND ARTLANG.idart = CATART.idart AND ARTLANG.idlang = '$lang' AND ".
         "ARTLANG.online = '1' ORDER BY CATART.idart DESC";

gruss

philippe
Gesperrt