[Zope] total "hits" in dtml-in?

A M Thomas am@virtueofthesmall.com
Tue, 16 Jul 2002 08:44:47 -0400

Thanks!  That does work.

It would be nice to have one just for the total number of hits, but I
can understand not wanting to clutter up the language.

- Am

Schmidt, Allen J. wrote:
> <dtml-in mysqlmethod>
>  <dtml-if sequence-start>
>   Total Records: <dtml-var count-MyVarName>
>  </dtml-if>
>  Current Value: <dtml-var MyVarName>
> </dtml-in>
> Basically, just add 'count-' to a variable to count. This gives the count
> all the records in the result set.
> -Allen
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of A M
> Thomas
> Sent: Tuesday, July 16, 2002 8:00 AM
> To: zope@zope.org
> Subject: [Zope] total "hits" in dtml-in?
> Hello,
> I've just put together my first Zope/MySQL database search interface.
> Gosh that's cool.  However, I have a question. Obviously.
> How can I get the _total_ number of returned results for a <dtml-in>
> statement (not the number in the current batch)?  This is probably so
> obvious that it's staring me in the face, but I can't find it anywhere.
> I even tried (quickly) perusing some source code, but maybe I was
> looking in the wrong place.  My main reference has been the Zope book,
> another Zope book, and searching the web site.