yo,
also so: SELECT id, tothread, byid, datum, count(DISTINCT(tothread)) as threads FROM foren_posts WHERE forumid = '$row2[id]' GROUP BY id, tothread, byid, datum, tothread ???
nachtrag, habe zu schnell gelesen. die aggregatfunktion brauchen nicht in die group by klausel.
Ilja