Categories > TinyButStrong general >

Current Record Show

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Martin
Date: 2005-07-18
Time: 02:44

Current Record Show

Hi, you are you ? Perhaps this is a stupid question but....., im trying to put something like 1 record found or if i find more than 1, X recordS, i using paging mode. Thancks a lot and sorry for my english.
Martin.
By: Skrol29
Date: 2005-07-18
Time: 23:02

Re: Current Record Show

Hello,

You can do something like :
$nbr_found = $TBS->MergeBlock(...);

and in the template:
[var.nbr_found;frm='0|0|no'] record[var.nbr_found;if [val]-=+2;then 's';else ''] found.
By: Martin
Date: 2005-07-19
Time: 03:37

Re: Current Record Show

Hi Skrol, thancks a lot, i test it but the problem is for example if you have 11 records and paging of 5 records, the 2 first pages will show 5 record(s) found, but the last one still showing 1 record(s) found, and i like to show 1 record found. This is because the var.nbr_found have a total of records found it (11) in my case. The goal is know how many records its showing in the current page, not the total of records. Do you have some idea ?
Thanks.Martin.
By: Martin
Date: 2005-07-19
Time: 03:41

Re: Current Record Show

Sorry Skrol, i have a mistake in my explication. In all of cases the variable var.nbr_found have the count of all records founds. In my case (11) in all pages. In all pagings show 11 records. Showing at 5. This produce 3 pages. 5,5,1 and in all cases show 11 records. Sorry for my english.
By: Skrol29
Date: 2005-07-19
Time: 13:04

Re: Current Record Show

And which number would you linke to be prompted ?
11, 5 or 1 ?
By: Martin
Date: 2005-07-19
Time: 15:52

Re: Current Record Show

Hi Skrol, i want to show at bottom of navigator the number of rows shows in this page. For example:
I have a query with 11 rows. I paging every 5 records, so i have 3 pages [1] [2] [3]
The 1 page have 5 records, the 2 page too, and the last one have 1 record. So the 1 page i hope to show 5 record(s) found, the 2 too, and the last one 1 record found. Some variable let my know the number of rows in the current pagination ? Thancks a lot.
By: Skrol29
Date: 2005-07-19
Time: 23:27

Re: Current Record Show


$LastRetrieved = $TBS->MergeBlock(...,$PageSize,$PageNum);
$CurrPageSize = (($LastRetrieved - 1) % $PageSize) + 1;