On Mon, May 25, 2009 at 2:43 PM, Tito Ciuro <tci...@mac.com> wrote:
> Hi Sam,
>
> On May 25, 2009, at 10:58 AM, Sam Carleton wrote:
>
>> Example:  Following the logic of the ScrollingCursor page, lets assume
>> a total result set of 88 titles.  If the lasttitle happens to be the
>> 29th title, so the set that is returned is 30 through 34, how do I
>> determine that this is the 6th page of a total of 18 pages?
>
>
> Let's assume 88 titles. For the sake of the argument, say you decide
> to display 12 per page. That would be 88 / 12 = 7.3 = 8 pages. If you
> need to know in which page a specific title lies (say 63), you can do
> something like ceil (63 % 12) = ceil (5.25) = 6th page. Following the
> same logic, ceil (88 / 12) = 8 pages total. Does that answer your
> question?

Actually, no it doesn't.  The math is simple enough, along with
finding the total count.  The question is how do I find out the number
of the title passed in...

According to the ScrollingCursor page, I should be passing in a title,
aka a string.  Since my record set is very dynamic, the title might be
the 63rd one time, but the next time it could be the 71st or 55th.

How do I find out the "index" of the start of the page as to apply
some basic math to find the page number?

Sam
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to