[Zope] Simple problem with sql-group
Casey Duncan
cduncan@kaivo.com
Tue, 13 Mar 2001 09:19:45 -0700
Zanotti Michele wrote:
>
> Hello,
> I 'm a Zope newbye. I have a (probably silly) problem with this sql-template
> (if you have already discussed this problem excuse me):
> select * from employees
> <dtml-sqlgroup where>
> <dtml-sqltest salary op=gt type=float optional>
> <dtml-and>
> <dtml-sqltest first op=eq type=string optional>
> <dtml-and>
> <dtml-sqltest last op=eq type=string optional>
> </dtml-sqlgroup>
> My question is:
> if I pass the value 10000 to parameter salary (and nothing to others) I
> expect to obtain the query:
> select * from employees
> where
> (salary > 10000)?
> But I obtain the query
> select * from employees
> where
> (salary > 10000
> and first = ''
> and last = ''
> ).
> Is this result correct and am I wrong?
> Can you help me? Thanks.
> Michele
>
Use type=nb in place of type=string on the last 2 sql-tests. "nb" stands
for non-blank string. Normal string accept blank values as you have
found already.
--
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>