NestedSet
| From: | LIMBOURG Arnaud | Date: | Wed, 03 Sep 2003 10:00:59 +0000 |
| Subject: | NestedSet | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-21014@lists.php.net to get a copy of this message | ||
Hi,
When fetching all nodes from the database the returned array has the node id
as a key. SInce it is found in the node_id element would it be possible to
change this behaviour to return an array indexed from 0 ?
1 =>
array
'id' => '1'
'rootid' => '1'
'l' => '1'
'r' => '6'
'norder' => '1'
'level' => '1'
3 =>
array
'id' => '3'
'rootid' => '3'
'l' => '1'
'r' => '2'
'norder' => '1'
'level' => '1'
2 =>
Would be
0 =>
array
'id' => '1'
'rootid' => '1'
'l' => '1'
'r' => '6'
'norder' => '1'
'level' => '1'
'name' => 'Compte'
1 =>
array
'id' => '3'
'rootid' => '3'
'l' => '1'
'r' => '2'
'norder' => '1'
'level' => '1'
'name' => 'Enseigne'
2 =>
It would simplify life (i wouldn't have to recreate array indexed from Zero
to give to smarty ;)
Arnaud.