phpbar.de logo

Mailinglisten-Archive

[php] Select-Problem

[php] Select-Problem

Ralf Eggert php_(at)_phpcenter.de
Sat, 25 Aug 2001 13:03:26 +0100


Moinsen Guenther,

versuchs mal hiermit:

  SELECT a.id, count(b.id) as anzahl
  FROM tabelle AS a 
  LEFT JOIN tabelle as b 
  ON a.id = b.parent
  WHERE a.parent = 0 
  GROUP BY a.id

Klappts?

Gruss,

        Ralf

-- 
__________________________________________
 In-Greece.de - die Griechenlandcommunity
_______ http://www.in-greece.de/ _________



php::bar PHP Wiki   -   Listenarchive