[Zope] zsql method question
Passin, Tom
tpassin at mitretek.org
Thu Oct 7 14:33:30 EDT 2004
> Laura McCord
> I am trying to do an insert but I do not want the insert to occur if
the
> value of "ipAddress" was not entered in the form.
>
> So far I have this:
>
> insert into NetInt(IPAddress, SystemNetName)
> Values(
> '<dtml-var name="ipAddress" sql_quote>',
> '<dtml-var name="HostName" sql_quote>'
> )
>
> I am thinking that I have to put a conditional statement such as
> <dtml-if ipAddress>
> insert into NetInt(IPAddress, SystemNetName)
> Values(
> '<dtml-var name="ipAddress" sql_quote>',
> '<dtml-var name="HostName" sql_quote>'
> )
> </dtml-if>
I would do the test before ever calling the insert method at all. Let
the insert do the one thing it is supposed to do, and let the program
control handle the flow of control.
Cheers,
Tom P
More information about the Zope
mailing list