| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Brian Seitz | Date: | April 2 1999 5:04pm |
| Subject: | Counting rows returned from a SELECT with perl DBI. | ||
| View as plain text | |||
I am creating a web-front end to search for database entries and I want
to split the output into more than one screen (limit 1 , 20, limit 21 ,
40, etc.) But in order to know when to stop allowing the user to press
"next" and get another screen of results when there are no results left,
I need to return how many total results exist without the limit
statement. Is there a better way to do this than executing the
statement without the limit and doing a count loop (i.e., "while
$row_ref = $sth->fetchrow_arrayref { $i++ } )? It seems like there
should be some DBI function that returns this automatically.
| Thread | ||
|---|---|---|
| • Counting rows returned from a SELECT with perl DBI. | Brian Seitz | 2 Apr |
| • Re: Counting rows returned from a SELECT with perl DBI. | Sasha Pachev | 2 Apr |
| • Re: Counting rows returned from a SELECT with perl DBI. | Brian Seitz | 2 Apr |
| • Re: Counting rows returned from a SELECT with perl DBI. | Vivek Khera | 2 Apr |
| • Re: Counting rows returned from a SELECT with perl DBI. | Daniel Koch | 2 Apr |
| • Re: Counting rows returned from a SELECT with perl DBI. | Douglas Brantz | 3 Apr |
| • Counting rows returned from a SELECT with perl DBI. | Michael Widenius | 3 Apr |
