while pager_query generates a multi-page view of the database query result, it doesn't support a constraint that could limit the total number of rows.
the LIMIT clause of SQL is used by this function, so developer can not put a limit on number of rows / pages returned by pager_query.
for example, we have a database table that includes 1000 records (with a timestamp field that shows the last update time) and we would like to create a view that displays only 100 recently updated records in 4 pages (25 records per page)....
I created a patch that adds a new argument ( with default value of 0 ) to the pager_query which allows developers define the maximum number of records (in this example 100) in the query resultset.
| Comment | File | Size | Author |
|---|---|---|---|
| pager.inc_11.patch | 1.01 KB | adli |
Comments
Comment #1
merlinofchaos commentedThis was filed against the wrong project.
Comment #2
magico commentedComment #3
LAs4n commentedIs this patch implemented?
Moving to cvs.
Comment #4
casey commentedhttp://api.drupal.org/api/function/theme_pager/7
D7 has a quantity option: The number of pages in the list.