Date:  03/23/2006 12:43:16 PM Msg ID:  002880
From:  Larry Zhang Thread:  002841
Subject:  Re: Thoughts on design..
How did you achieve this? Could you show us your script?
Thanks.
 
Sent by Ali Koumaiha on 02/21/2006 06:42:21 AM:
Thank you.  I ended up doing that and I wrote a nice script to display 'tree like' from a table.  tested it on:
 
1000 Record (Parents)
  100 Children
    each child having 300 records.
 
And it was really fast :)
 
I love Foxweb
 
 
Sent by FoxWeb Support on 02/20/2006 05:31:45 PM:
Are you asking for help on the structure of the table that will hold this information?  A fairly popular method is to have a parent id field in your table, indicating the parent id of the current document.  At the very minimum, your table will contain a document id, the parent document id, a title and the content.  It would be fairly easy to write a recursive function that can return all descendants of a particular document.
 
In addition to this, you could add a RootID field, representing the top level document for a particular child.  This would allow you to quickly get a list of all descendants of a root, with a single select statement (as opposed to having to call the recursive function I mentioned above).

FoxWeb Support Team
support@foxweb.com email

Sent by Ali Koumaiha on 02/19/2006 07:37:04 PM:
I am currently using Foxweb and i have developed an internal portal/ordering system for my company.  I am currently stuck on a design issue for our File-Library section.
 
Basically, Our corporate staff will be placing files and links and news articles on the portal section and it is appearing to me that it will look like a tree in a sense.
 
I have spent a week so far to come up with a nice design to handle this.  I am stuck.  Any thoughts would be greatly appreciated.
 
I have created a Tree table similar to the table of the Treeview of FoxPro, but i haven't been  successful.
 
This is what i would like to have:
 
- Root 1
   - Child 1.1
   - Child 1.2
   ----- Child 1.2.1
- Root 2
- Root 3
  - Child 3.1
 
Etc.  I am thinking, when the script loads the page, i only display the parents (root 0) Root 1,2 & 3.  Then, depending on which link (fwx will track the root by something like this DisplayRoot.fwx?NodeID="<%=root%>". 
But, the expand function is killing me.  Any thoughts?  Has anyone coded a catalog/tree type similar to my concept and were succesful?
Please help.
 
Thanks