zope writes:
 > I want to test if there is some data in a table.
In Zope, ZSQL methods return objects that behave like a
sequence (of hit rows).

In Python, an empty sequence is false while a non-empty sequence
is true.

Thus, you can use:

      <dtml-if "ZSQLmethod(....)">

to test any SQL query for a non-empty result set.

The "_.len(...)" function returns the length of a sequence,
in case you are interested in the number of hits.


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to