Page 1 of 1

Dynamically loading a static folder list

PostPosted: Thu Nov 15, 2007 3:58 pm
by vadar36
just started playing with this script and love it but cant get it to do what i want.

I have a table full of items which i want to add dynamically. I know im being dumb but i just cant get this to work.


do {
if ($row_tree['type'] = 'tools'){
} while ($row_tree = mysql_fetch_assoc($tree));


Basically i get 1 entry and then it dies. any help would be really appreciated.

PostPosted: Thu Feb 14, 2008 11:22 am
by ybuskila
why do you add + 10 to the id ?
why do you write 8, 10 in parentid filed ?

you should have id, parentId from the database and then you put them in the addToArray function as they come from the database, the script recognize the parent and it's sons by himself