Re: [fw-general] Iterating a Tree

2009-06-11 Thread Jason Webster
om Subject: [fw-general] Iterating a Tree if i have a table like Nodes === id name parent (ref Nodes.id) how shld i iterate thru it? i am using PHP. wondering if theres an efficient way ... i did it something like mysql_connect("localhost", "root"); mysql_select_db(&

Re: [fw-general] Iterating a Tree

2009-06-11 Thread Brenton Alker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Razorblade wrote: >> >> I use this class from Hector Virgen >> >> http://blog.virgentech.com/2009/06/zenddbtable-enhancements.html >> >> Sergio Rinaudo >> iceangel89 wrote: > i replied in his blog also ... but i also post here ... > > i dont really

RE: [fw-general] Iterating a Tree

2009-06-11 Thread iceangel89
> > >> Date: Thu, 11 Jun 2009 03:15:12 -0700 >> From: comet2...@gmail.com >> To: fw-general@lists.zend.com >> Subject: [fw-general] Iterating a Tree >> >> >> if i have a table like >> >> Nodes >> === >> id >&g

Re: [fw-general] Iterating a Tree

2009-06-11 Thread Matthew Ratzloff
Breadth-first traversal or depth-first traversal. This is one possible implementation of a depth-first traversal in a database table: http://www.sitepoint.com/article/hierarchical-data-database/ -Matt On Thu, Jun 11, 2009 at 3:15 AM, iceangel89 wrote: > > if i have a table like > > Nodes > ===

RE: [fw-general] Iterating a Tree

2009-06-11 Thread Sergio Rinaudo
I use this class from Hector Virgen http://blog.virgentech.com/2009/06/zenddbtable-enhancements.html Sergio Rinaudo > Date: Thu, 11 Jun 2009 03:15:12 -0700 > From: comet2...@gmail.com > To: fw-general@lists.zend.com > Subject: [fw-general] Iterating a Tree > > > i

[fw-general] Iterating a Tree

2009-06-11 Thread iceangel89
if i have a table like Nodes === id name parent (ref Nodes.id) how shld i iterate thru it? i am using PHP. wondering if theres an efficient way ... i did it something like mysql_connect("localhost", "root"); mysql_select_db("test"); $arr = array(); $sql = "SELECT * FROM nodes WHERE