[Zope] dtml-sqlgroup question.

Capesius, Alan CapesiusA@Sysmex.com
Thu, 29 Mar 2001 17:52:46 -0600


use default values on the parameter definition

<params>mfg_id="" mfg_name""</params>


>>>-----Original Message-----
>>>From: Jeremy Cowgar [mailto:jcowgar@bhsys.com]
>>>Sent: Friday, March 30, 2001 12:33 AM 
>>>To: Zope@zope.org
>>>Subject: [Zope] dtml-sqlgroup question.
>>>
>>>
>>>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
>>>
>>>_______________________________________________
>>>Zope maillist  -  Zope@zope.org
>>>http://lists.zope.org/mailman/listinfo/zope
>>>**   No cross posts or HTML encoding!  **
>>>(Related lists - 
>>> http://lists.zope.org/mailman/listinfo/zope-announce
>>> http://lists.zope.org/mailman/listinfo/zope-dev )
>>>