[Zope] ZSQL: how to definde null

Christoph Landwehr chris-zopemailing at gmx.de
Mon Oct 27 08:13:44 EST 2003


Dieter Maurer schrieb:

> Christoph Landwehr wrote at 2003-10-21 00:57 +0200:
>  > I have a ZSQL method, that looks like
>  > 
>  > Attributes:
>  >   some_name='empty'
>  > 
>  > UPDATE
>  >     foo
>  > SET
>  >     bar = <dtml-sqlvar some_name  type="string">
>  > WHERE
>  >    some contitions ... ;
> 
> You can try the "optional" attribute for "dtml-sqlvar".
> You might need to use "type=nb" (non blank) rather than "type=string".

In this case I dont't see how this could work, because I have to define 
'some_name' in the SQL-Method's Attributes and supply a default value in 
case the user does not supply a value for 'some _name' in the form that 
feeds the SQL-Method. Therefor sone_name is never blank and the optional 
never is true.

Am I missing something?








More information about the Zope mailing list