Hallo nochmal,
ich sehe schon, heute ist nicht mein Tag.
Ich versuche eine Katalog Navigation zu erstellen, die Kategorien nur anzeigt wenn es auch sichtbare Einträge gibt.
Funktioniert fast, nur der subitemcount Wert beachtet nicht das Sichtbar-Feld. Die SQL bekommt das Sichtbar-Feld auch richtig übergeben, allerdings werden statt korrekt 1, 2 Ausgegeben.
SELECT pid, id, alias, (SELECT COUNT(*) FROM tl_taxonomy i WHERE i.pid=o.id) AS childCount, name AS name, (SELECT COUNT(t.id) AS count FROM d_firmen AS t WHERE t.company_visibility=1 AND company_branche IN (SELECT id FROM tl_taxonomy AS t WHERE pid=o.id) OR company_branche=o.id) AS itemCount FROM tl_taxonomy o WHERE pid IN (4) ORDER BY sorting
Hat jmd. ne Idee wie man das fixen kann?
Lesezeichen