RE: AW: Count of children

2006-09-27 Thread Robert DiFalco
2006 8:20 AM To: André Hänsel Cc: mysql@lists.mysql.com Subject: Re: AW: Count of children André With an edge list, the solution entails recursion, so you need either an sproc or application proc. With a nested sets model, the count is dead simple. If the id of the target row is N, and the

Re: AW: Count of children

2006-09-27 Thread Peter Brawley
André With an edge list, the solution entails recursion, so you need either an sproc or application proc. With a nested sets model, the count is dead simple. If the id of the target row is N, and the left & right node columns are named leftedge and rightedge, the query is SELECT COUNT(t2.id)

Re: AW: Count of children

2006-09-27 Thread ddevaudreuil
I've found this website to be extremely helpful: http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html Donna DeVaudreuil André Hänsel <[EMAIL PROTECTED]> 09/27/2006 10:55 AM To <[EMAIL PROTECTED]> cc Subject AW: Count of children I will use any model that is suitable. ;)

re: AW: Count of children

2006-09-27 Thread 'Rob Desbois'
André > Sorry, my english sentence was imprecise. :) I want the count of all > sub-entries AND THEIR sub-sub-entries. Example: A / \ B C / \ D E \ F So I want to know that C has 3 sub-nodes. Aha! I thought it seemed like an easy question ;-) As far as i know, the onl