[Zope-DB] RE: RE: Form evaluation in ZSQL-Method
Andreas Tille
tillea at rki.de
Thu Sep 18 11:24:02 EDT 2003
On Thu, 18 Sep 2003, Smith, Neil (Worcester) wrote:
> Just reverse the order of the "AND" and the "IF" and it will work:
>
> <dtml-sqlgroup where>
> <dtml-sqltest otheritem op=ilike type=nb optional>
> <dtml-and>
> <dtml-if "iditem>0">
> <dtml-sqltest iditem column=iditem op=eq type=int optional>
> </dtml-if>
> </dtml-sqlgroup>
Well, this works syntactically but brings me back to a problem which is quite
similiar to my first one:
If I have one of the items selected and the result set is greater than 20
I get
Error Type: NameError
Error Value: global name 'iditem' is not defined
if I follow the link to "next 20 results".
Even more stupid is the fact that a selected iditem=0 has no results even if
it should bring up the whole data set which lets me suspect that something
is wrong with the <dtml-if> approach even if it sounds very logical to me. :-(
Thanks for your quick help anyway
Andreas.
More information about the Zope-DB
mailing list