[Zope] Re: Odd problem updating a PostgreSQL DB

Passin,Thomas B. (Tom) tpassin@mitretek.org
Mon, 16 Sep 2002 10:38:26 -0400


[ Tim Wilson]
>=20
>   <dtml-if our_score>our_score =3D <dtml-sqlvar our_score=20
> type=3D"int" optional=3D"true">,</dtml-if>

There is your problem, as Evan predicted. When our_score is zero, the
test fails, since 0 is the value for a logical "false".  Besides Evan's
suggestion, you could convert to a string for the test -

<dtml-if "_.str(our_score)">

But this would fail if the variable "our_score" did not exist.  Really,
I think you want to test for its existence, not its value, do you not?

Cheers,

Tom P