2. abfrage von erster abziehen

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • 2. abfrage von erster abziehen

    hallo!

    komme wieder mal nicht weiter...

    problembeschreibung:
    ich habe eine volltext-suchabfrage gebastelt die an sich auch funktioniert. aber ich habe im text zum teil auch html-tags drin (überwiegend links, die das eigentliche prob sind), durch die ergebnisse kommen, die nicht gewünscht sind. obendrein werden durch die texthervorhebung die links zerschossen. z.B.:
    <a href="bernd-<b>ober</b>meier.mp3"> statt
    <a href="bernd-obermeier.mp3">

    am einfachsten wäre ein sql-befehl, der einfach alle html-tags bei der suche ignoriert, aber den scheint es nicht zu geben.

    jetzt suche ich also eine möglichkeit, die von dem ergebnis dieser abfrage:
    PHP-Code:
    $result mysql_query("SELECT
    c.id , a.id , a.title , a.format , 
     a.bestand , a.details , 
     b.artistid , b.artikelid , b.verbindung , c.artist
    FROM Artikel a
    INNER JOIN lookup b
     ON a.id = b.artikelid
    INNER JOIN artists c
     ON b.artistid = c.id
    WHERE a.details LIKE '%"
    .strtolower($search)."%'
     AND a.bestand > 0
     AND (b.verbindung = 1
     OR b.verbindung = 2)
    GROUP BY a.id
    ORDER BY c.artist , a.title"
    ); 
    das ergbnis dieser hier
    PHP-Code:
    $result mysql_query("SELECT
    a.id , a.details
    FROM Artikel a
    WHERE a.details NOT LIKE '%\<a%"
    .strtolower($search)."%\>%'"); 
    abzieht.

    google konnte nicht helfen
    weiß jemand eine möglichkeit das zu realisieren?

    dank schon mal vorab!
    Zuletzt geändert von dieter2; 09.02.2007, 13:50.

  • #2
    schade das keiner helfen konnte -> hat mich jetzt nen ganzen tag gekostet.
    PHP-Code:
    $result mysql_query("SELECT
    c.id , a.id , a.title , a.format , a.bestand , a.details , 
    b.artistid , b.artikelid , b.verbindung , c.artist
    FROM Artikel a
    JOIN Artikel d
    ON a.id = d.id
    INNER JOIN lookup b
     ON a.id = b.artikelid
    INNER JOIN artists c
     ON b.artistid = c.id
    WHERE a.details LIKE '%"
    .strtolower($search)."%'
     AND d.details NOT LIKE '%<a%"
    .strtolower($search)."%>%'
     AND a.bestand > 0
     AND (b.verbindung = 1
     OR b.verbindung = 2)
    GROUP BY a.id
    ORDER BY c.artist, a.title"
    ); 
    so funktionierts
    JOIN auf die gleiche tabelle. ...da soll einer drauf kommen...

    Kommentar

    Lädt...
    X