The function creates its own query to count records by rewriting yours. Usually that's fine but there are cases where it's not accurate. When that happens there's a third parameter you can pass that will be a query that returns the number of records you're dealing with. On 5/2/05, Scott Courtney <scott@4th.com> wrote:
Is there a good example somewhere illustrating the correct use of calls to theme('pager',....)?
I'm trying to use this function, and I've actually got it working except for one issue: I don't know how to tell it the actual number of rows that were returned from my database query.
I see the "tags" array that can be passed, and it *looks* as if that would be the right thing to do. But node.module, statistics.module, and all the others I can find in Drupal core seem to always pass NULL for that parameter to theme_pager(). So I'm led to conclude that somehow theme_pager() gets this information from elsewhere in the "normal" case.
The example modules, as luck would have it, don't use this feature.
Suggestions?
Scott
-- ------------------------------------------------------------------------------ Scott Courtney | "I don't mind Microsoft making money. I mind them scott@4th.com | having a bad operating system." -- Linus Torvalds http://4th.com/ | ("The Rebel Code," NY Times, 21 February 1999) | PGP Public Key at http://4th.com/keys/scott.pubkey