[Zope-DB] how to get all values if input is not defined?

Jaroslav Lukesh lukesh at seznam.cz
Thu Apr 8 02:13:03 EDT 2004

Cynthia Kiser wrote:
 > You want to use sqltest with the type of "nb". From

 > type
 >     The data type of the value to be inserted. This attribute is required
 >     and may be one of string, int, float, or nb. The nb data type stands
 >     for "not blank" and indicates a string that must have a length 
that is
 >     greater than 0. When using the nb type, the sqltest tag will not
 >     render if the variable is an empty string.
 > So for you example, the code should look something like:
 > select * from X
 >   where <dtml-sqltest A op=eq type=nb>

Many thanks, but I receive: Invalid empty string value for typ_prez

It is because A already exist in request, but is empty ("").

I wil try to another method with dtml-if (I wan not know that dtml-if is 
usable in ZSQL methods :o)

Many thanks,

J. Lukesh

 > Quoting Jaroslav Lukesh <lukesh at seznam.cz>:
 >>Dear sirs,
 >>I have table X
 >>A	B
 >>aa	bb
 >>ab	bc
 >>aa	bd
 >>aa	be
 >>and have ZSQL method:
 >>SELECT  *
 >>FROM    X
 >>WHERE   (X.A = <dtml-sqlvar A type="string">)
 >>How to display all table if A is not selected by user?


Jaroslav Lukeš

Tento e-mail nemu*že obsahovat VIRY
jelikož nepocházi z virózního systému M$ Windows!

More information about the Zope-DB mailing list