Posted by Manfred Sorg on 11/30/07 12:13
Did you think of this: select t1.ID, t1.Subject, count(1) as Num_replies_to from tbl t1 left join tbl t2 on t2.Reply_to=t1.ID where t1.Reply_to=0 group by t1.ID, t1.Subject Bye, Manfred
[Reply to this message]
Copyright © 2005-2006 Powered by Custom PHP Programming