From SQL query to dtml-tree, anyone?
In my growing IT intranet app, I'd like to generate a tree based on one or more SQL queries. Purpose: Creating a notepad tree (which ressembles the Windows programme Treepad, which is a sort of notepad organizer) to be used by IT staff for destroying the Post-IT plague. Question: How do I handle data from one or more queries into a dtml-tree? One of my preliminary ideas was two tables in the db, one with the note-nodes and parentID in it and another with ID and childrenID's in it. Then simply query from tree root and out, a bit like working in linked lists. I'd appreciate any input on this idea. I'd prefer to have the data outside Zope in a SQL db due to other (and important) purposes. -- Best regards / Mvh., Steen Suder Linux Systems Administrator sfs@sciatl.dk
Steen Suder wrote:
In my growing IT intranet app, I'd like to generate a tree based on one or more SQL queries.
Purpose: Creating a notepad tree (which ressembles the Windows programme Treepad, which is a sort of notepad organizer) to be used by IT staff for destroying the Post-IT plague.
Question: How do I handle data from one or more queries into a dtml-tree?
One of my preliminary ideas was two tables in the db, one with the note-nodes and parentID in it and another with ID and childrenID's in it. Then simply query from tree root and out, a bit like working in linked lists.
better make it just one table with (id,parent_id, and label) and start with node where parent id =0. then for each parent query from the table where parent_id = current id ------- Hannu
On Tue, 12 Oct 1999 08:59:52 +0000, you wrote:
In my growing IT intranet app, I'd like to generate a tree based on one or more SQL queries.
.....
I'd prefer to have the data outside Zope in a SQL db due to other (and important) purposes.
Of course, you can make Zope data available outside of Zope using xmlrpc, FTP, etc. my appologies if you knew this. Toby Dickenson
participants (3)
-
Hannu Krosing -
Steen Suder -
Toby Dickenson