[Zope] optional sql tag
Dieter Maurer
dieter@handshake.de
Fri, 22 Mar 2002 23:20:25 +0100
Horvath Adam writes:
> I have 3 select -> there are 3 form variable: year, month,
> day
> which are arguments for the ZSQL Method:
>
> select * from table c
> <dtml-sqlgroup where>
> ...
> <dtml-and>
> c.date >= <dtml-sqlvar "year+'-'+month+'-'+day"
> type=string>
> <dtml-and>
> ...
> </dtml-sqlgroup>
>
> It works great, but when there is nothing in the form
> variables,
> it will be c.date >='--'
Use an "dtml-if" to check for the empty condition.
Dieter