By: klepy
Date: 2008-08-07
Time: 21:10
|
record number when using ByPage PluginHi,
I would like to know if there is a reasonable solution for a minor problem of mine. (means i can live without it, but would be nice if there is a solution for it) I made a page displaying the results of SQL queries with parameters, of big tables. I am using the ByPage and the NavBar plugins, and seems to work fine. Is there a way to show on screen the total number of records of the query ? Taking the number of the merged records only shows the page size (or less), because of the ByPage Plugin. And i would prefer NOT do do the same query again only to get the total number of records. Thanks. |
By: TomH
Date: 2008-08-07
Time: 23:02
|
Re: record number when using ByPage PluginI have the code to my solution available at
http://tomhenry.us/tbs3/ look at the example "Efficient Paging" (it is the bottom of the left column of examples). Hope that helps, TomH |
By: klepy
Date: 2008-08-08
Time: 14:37
|
Re: record number when using ByPage PluginThanks TomH,
yes, this is what i was searching for. Although i am using ms-sql and applied: $found = $db->get_row("SELECT @@rowcount as rows"); which seems to be the equivalent for "FOUND_ROWS()" in MySql. thanks a lot, Klemens |