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. I know about the cool dtml-in variables like previous-sequence-start-index, next-sequence-size, etc., but I want to be able to state on my results form "records 21-40 of X shown" - how do I gracefully get X? I know I could do a len() of the query, but that seems like a bad idea because the database would essentially get queried twice - once to get the len, and once to create the <dtml-in> list. Right? Am I missing something? Of course I am. Any help would be much appreciated. Yours, Am
A M Thomas writes:
... How can I get the _total_ number of returned results for a <dtml-in> statement "dtml-in" defines a lot of sequence variables, among others "sequence-length", the length of the sequence.
You know, that you can use the "prefix" attribute to "dtml-in" to give it a slightly more convenient name... Dieter
That's what I wanted - I must have looked straight at it several times. Thank you. - Am Dieter Maurer wrote:
A M Thomas writes:
... How can I get the _total_ number of returned results for a <dtml-in> statement "dtml-in" defines a lot of sequence variables, among others "sequence-length", the length of the sequence.
You know, that you can use the "prefix" attribute to "dtml-in" to give it a slightly more convenient name...
Dieter
participants (2)
-
A M Thomas -
Dieter Maurer