Help: Recursive querying
Hello, it is me again. I am finally at a point where I try to write my first application in Zope. My goal is to write a threaded Discussion Board. I did one before in Python using CGIs. Here is the supporting table in PostGreSQL: id int4 pid int4 date datetime title varchar(40) body text All messages that have pid 0 are root messages. The pid points at another row in the same table. It is very easy to write a recursive function to view a tree or a subtree of the message board. I wrote all all necessary Z SQL Methods. Here my problem: I do not know how to write recursive functions in Zope using the Z SQL Methods and external methods. Additional, to make it even harder, I want to use the tree tag to display the message tree. Here my Z SQL Method: ID: qry_msgs_by_pid Title: Query: Get all messages that the Parent Connection id: PyGreSQL_database_connection Arguments: pid:int Query template: select * from msg where <!--#sqltest pid column=pid type=int--> Can someone please help my out. I believe I still have some troubles understanding the philosophy of Zope, since I still think in CGI terms. :) I would love to write all my web applications in Zope. I read all the tutorials, but some of the examples are not general ot detailed enough to understand the "kernel" of DTML and Zope. Thank you so very much for your help. stephan -- Stephan Richter iXL - Software Designer and Engineer
participants (1)
-
Stephan Richter