On Tue, 16 Aug 2005, Ligesh wrote:
>
> Hi,
>
> How do we know the total number of results, when we are using LIMIT? is
> there any parameter that returns the real number of matches?
Not as far as I know, but if you're after a "displaying X of Y rows" type
result, you can get the total number of rows beforehand, wrapping it all
in a transaction:
begin;
-- Get Y row count of matches
select count(*) from <table> where <condition>;
-- Get X rows
select <columns> from <table> where <condition> limit <X>;
commit;
>
>:: Ligesh
>
Christian
--
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST MS ATTACHMENTS
/ \