[Zope] Help with drill down SQL queries
Mark Langkau
mark.langkau@pbmplus.com
Fri, 22 Jun 2001 07:44:45 -0500
Hi,
Rather than reinvent the wheel, I'll ask here to see if anyone has done
this before.
I'd like to have an SQL query return data that I will display in a table
format. Lets say this will include columns such as Customer Number,
Order Number, Part Number, etc. I would like to add "drill down"
capabilities to this by having each cell in a column be a link to
another query/result table that uses the cell contents as a parameter
for the query. For example, if the Customer column displays each
customer number as a link, I could get a page showing all orders placed
by this customer by clicking on that customer's link in this table.
I would like the solution to be generalized so a developer/designer can
indicate which columns in the result should have "links" turned on. For
example, if I click on the Customer Number link in this table, I get a
page with another table listing customer order numbers, dates, totals,
etc. and the Order Number column in that table has "links" turned on so
I can click an order number link and get another table showing complete
details for that order. ( And then click on a Part Number, to get
details of the product ...)
This sounds simple. Format the contents of the column as a link and call
another predefined query object with the cell contents as a parameter.
But, I haven't really worked with SQL queries in Zope and I'm not sure
where to start. I have successfully installed the DCOracle2 product (and
similar MySQL) and have the test queries working. I am also reading the
Relational Database chapter of the Zope Book.
Oracle's WebDB product does this, and we are looking to work completely
within Zope as much as possible. We will be querying Oracle 8 databases
mostly, but will also like to use this with MySQL (and PostgreSQL).
Cheers,
Mark