[Zope] Simple, I think!

Mark N. Gibson mark@kaivo.com
Wed, 25 Jul 2001 15:16:38 -0600 (MDT)


You could do this:

<dtml-let results="SQL_Select()">
#Results returned = <dtml-var "_.len(results)">
</dtml-let>

Mark

> 
> I've looked everywhere and I think this should be simple but I'm not getting
> it
> 
> 
> I simply want to count the number of records generated by an ZSQL Method
> (SQL query) within a DTML Method (something like get the record count of
> that certain query).  I then want to refer to this number (could be zero if
> there are no records) and say if this number is zero then do something, else
> do something else.
> 
> Can anyone help??
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>