[Zope] DTML tree with ZSQL methods
Schmidt, Allen J.
aschmidt@nvcc.edu
Mon, 14 Oct 2002 14:06:58 -0400
Seeing the other tree question made me think of something I have been
curious about: how to build trees from ZSQL methods.
I have a MySQL table of cars with car-common fields: YEAR, MAKE, MODEL,
BODYTYPE, COLOR, etc.
What I would like to do is have a tree showing the words as above like this:
+YEAR
+MAKE
+MODEL
...etc
Expanding the word YEAR would show a list of distinct years with maybe a
count of cars for each year. Same concept for the others top levels.
+2002 (57)
+2001 (39)
+2000 (43)
...etc
Expanding the actual YEAR would show all MAKEs (and counts) for that YEAR.
Same concept for the other criteria.
How would the tree code look for doing something like this? And the ZSQL
methods?
Pointers or links to available material would be appreciated.
Thanks
Allen