[Zope] limiting no. of records retrieved

Greg Conway greg@gmlnt.com
Sun, 18 Aug 2002 15:53:08 +0100


Hi all,

I've been trying to limit the no. of records retrieved by a MySQL query.

I've managed to do this, using LIMIT, and have built this into my Zope app,
but....

How can I retrieve the number of records that would have been retrieved if I
hadn't limited the Query?

So I can display something like 'display records 1 - 30 of 250', if you see
what I mean.

The MySQL documentation tells me I can do it using the FOUND_ROWS()
command - if I am using version 4.0 + of MySQL! which I am not.

So, is there a way of achieving this in Zope? Seeing as it's so cool at
everything else!!

Many thanks for any help!

Regards,

Greg Conway.

This electronic transmission and any files attached to it are strictly
confidential and intended solely for the addressee. If you are not
the intended addressee, you must not disclose, copy or take any action
in reliance of this transmission. If you have received this
transmission in error, please notify us by return and delete the same.
Further enquiries/returns can be posted to postmaster@gmlnt.com
Thank you.