Categories > TinyButStrong general >

paging on alphabeth

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: bert
Date: 2003-12-08
Time: 23:41

paging on alphabeth

I have a rather long member list (2000+) and want to have pages per first letter of the last name and an index page.
Is ther a TBS shortcut for this? Anybody has an example? Can I use paging for this?
By: Skrol29
Date: 2003-12-09
Time: 01:08

Re: paging on alphabeth

Hello,

I think yes you can use the TBS ByPage mode for that.
You may combine a dynamic query with a ByPage mode.

$TBS->MergeBlock('blk1',"select id, name from t_people where lower(left(last_name,1))='$letter'",$pagesize,$pagenum) ;

Don't forget to put an index on the last_name column.
You can also display a global summary using clone blocks.

Just an advice : the TBS ByPage mode is not optimized for large amount of data. This will be precised int the next manual. In your case, you have an average of 2000/26 = about 80 records per letter, which is not so much.
But if you have some problem of slow page, leave the ByPage mode. And I suggest that you build a special table that will save the global summary.
By: bert
Date: 2003-12-09
Time: 08:09

Re: paging on alphabeth

Excellent, thank you very much, thought that TBS could handle
that. We 'll try it today and feedback the results. We are to use this on the donator page. TBS is now used on the sponspor page, link page and news page of www.degrootstekerstboom.nl "the biggest christmas tree" (Guinnis book of records) in NL. Thank you for making TBS available.
The site was fryday public and we have now 300+ visitors a day. Sorry there is only one English page...
By: bert
Date: 2003-12-10
Time: 09:38

Re: paging on alphabeth

Feedback: it works fine! See: http://www.degrootstekerstboom.nl/donateurs.php (page bottom).
By: Skrol29
Date: 2003-12-11
Time: 01:29

Re: paging on alphabeth

Cool.
I keep you url in my lis of TBS sites.