RE: Alternate Pagination question

2010-09-04 Thread Dave Maharaj
Thanks for the code. I ended up with something very similar, I just ran a query finding first record starting with letter while looping thru the alphabet (cache query so it only runs once like yours) then pass it off as an array 0 or 1 for each letter if has record it becomes a link if 0 then just

Re: Alternate Pagination question

2010-09-04 Thread cricket
On Fri, Sep 3, 2010 at 4:52 PM, Dave Maharaj wrote: > Has anyone created,  thought of , started on the idea of an alphabetical > character paging system? > > So rather than 1 | 2 | 3 it spits out A |B |C? I did that awhile ago. It originally was a non-Cake site and I had most of the legwork done

Re: Alternate Pagination question

2010-09-03 Thread Sam
The most efficient way database-wise would be to have a char(1) database column that you populate with whatever the first letter of the field you're using... that way it could be indexed and easily counted. It would be slightly slower when saving data but (I assume) much faster retrieving it. If

RE: Alternate Pagination question

2010-09-03 Thread Dave Maharaj
Sorry , my first thought would be to do a looping find->first of each letter and so if it found a record starting with A set that link true, if nothing for B then just the letter no link and co on... The only problem I see is 26 queries just to build the paging links. Other ideas? Tha