[Zope] dtml-sqlgroup question.
Jeremy Cowgar
jcowgar@bhsys.com
Fri, 30 Mar 2001 01:33:17 -0500
I have created code that uses dtml-in ... sequence tags and I want to be able
to use the same page (mfgList) to access diffrent sets of that data.
For instance, say I have three companies in my manufacturers table:
Borland, Microsoft and Novel.
I want to be able to see all entires (using the great PREV/NEXT tags that
sequences provide) but then I also want to use the same page to display
filtered data (only companies in Washington for instance).
My problem lies in that I do not always pass the parameters.
Here is my sql code:
<params>mfg_id mfg_name</params>
select *
from mfg
<dtml-sqlgroup where>
<dtml-sqltest mfg_id op=eq type=int optional>
<dtml-and>
<dtml-sqltest mfg_name op=like type=string optional>
</dtml-sqlgroup>
order by mfg_name
and here is sniplet's of my dtml code (mfgList.z):
<dtml-in mfgSelect.sql size=10 orphan=1 start=query_start>
... all the stuff to display the info, prev and next tags ...
</dtml-in>
What happens is Zope err's when all the parameters are not sent. From another
page, I may reference a URL like:
mfgList.z?mfg_name=Bor
What I want that to do is display everything that is like Bor ... but it
complains that it did not recieve enough parameters.
Can anyone help me with this problem?
Thanks!
Jeremy - jeremy@cowgar.com