[Zope-DB] Testing for empty result set

Aaron Fosdick aaron at hypervision.com
Fri Mar 25 14:28:47 EST 2005


Martin,

Other people (aka Charlie) have more elegant solutions than me, but I 
just do the following.

Assuming your query looks like:
<div tal:define="results python:here.somequery();
... >

You can test within the body:
<span tal:condition="not:results">No results found....</span>

--
Aaron


Martin Jennings wrote:

>Hello,
>
>thanks to the advice offered on this list some time ago, I have managed to
>get my zope/plone set-up to connect to an Oracle DB and extract data.
>
>Now all I have to do is test for an empty result set.
>
>I suppose that I do this using the tal:condition attribute, but am not
>sure what I am suppose to be testing.
>
>Any help would be more than welcome.
>
>Tank you in advance.
>
>Martin Jennings
>
>_______________________________________________
>Zope-DB mailing list
>Zope-DB at zope.org
>http://mail.zope.org/mailman/listinfo/zope-db
>  
>



More information about the Zope-DB mailing list