On Thu, May 20, 2004 at 03:26:25PM +0100, Dale, Matt wrote:
: This is the wrong list i'm pretty sure but there are a couple of ways to get
: the number but there isnt a direct method that returns it.
: 
: If the result set is scrollable you can iterate through it counting the number
: of iterations, then set it back to the start when you want to process the
: records.

If I can stand a second trip to the DB:
        select COUNT(*) from {...rest of query here...}
then, perform the normal query.

This is great for when you are going to pull back a subset of records,
e.g. to display X of Total records per page.

Slight risk of a race condition if the data's volatile, but...

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to