AW: [Zope] multiple optional args to zsql method?

Ulrich Wisser Ulrich Wisser <u.wisser@publisher.de>
Tue, 26 Nov 2002 13:50:35 +0100


Hi,

I usually use a dml-if construct to do this

>>      <dtml-sqlgroup where>
>>        <dtml-sqltest name="id" op="eq" type="int" optional>
>>      <dtml-or>
<dtml-if zope_username>
>>        <dtml-sqltest name="zope_username" op="eq" type="string" optional>
</dtml-if>
>>      </dtml-sqlgroup>

only problem with this approach is, that you can not test
for a blank user name. In that case

<dtml-if "_.has_key('zpe_username')">

should help.

Ulli

-- 
Expand to Sweden? Get local prospects.   http://www.PublisherSEO.com/2
World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg
http://www.publisher.de   Tel: +46-8-53460905    Fax: +46-8-534 609 06