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(&
-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
>
>
>> 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
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
> ===
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
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