There was a thread posted awhile back by "sponge" or "Wil" regarding spanning page codes to work with MySQL results.
Using LIMIT with COUNT functions is not the ultimate answer. Basically, what you would need to do is get all results based on user or system parameters, then you would perform calculations against the total results.
Example: (from LINKS SQL v.1.13)
Quote:
($DBOBJ->hits > 10) and ($span = $LINKDB->toolbar()); Re-executing your query, even if you save the query in cache, would be server resource intensive.
You can look in LINKS SQL for the toolbar subroutine, which basically calculates the hits by the maximum hits allowed per page.
Hope this helps.
========================================
Buh Bye!
Cheers,
Me