RE: Recursive query

2006-05-18 Thread Gokhan Demir
After deciding a max level, you can self join the table max level time. Also, you can add two columns, one int column as a hashcode, and one int column as showing current level. And by writing a simple program, you can update the hashcode field. You can think bitwise. Just reserve n bits for

Re: Recursive query

2006-05-18 Thread Peter Brawley
Peter, Right now I am doing this with PHP and a recursive function, but is it possible to do this directly with one query? SQL is not recursive, so you need an sproc. There are some examples with discussion at http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html. PB -

RE: Recursive query = Nested Set

2006-05-18 Thread Daevid Vincent
://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html You had me at EHLO --E.Webb (10.04.05) -Original Message- From: Gokhan Demir [mailto:[EMAIL PROTECTED] Sent: Thursday, May 18, 2006 12:11 PM To: mysql@lists.mysql.com Subject: RE: Recursive query After deciding a max level, you can

RE: recursive query

2001-06-15 Thread Chris Bolt
http://marc.theaimsgroup.com/?l=mysqlm=99213870412899w=2 http://marc.theaimsgroup.com/?l=mysqlm=99214323317893w=2 http://www.bolt.cx/misc/thread.txt hi, how can i make recursive querys in mysql? i want to show a tree. my table: tree (id int, parent int, name char(10)); ... thanks