SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,530
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Pagination Behavior??

    Here is tricky scenario that I just thought of...

    Let's say you are reading your PM's.

    You have 93 Messages, with 10 Messages shown per page (i.e. 10 pages).

    Currently, you are have PM's sorted By Date, in Descending Order, and you are done reading all of the newer PM's and way back on Page #7 (i.e. Messages 70-79).

    In the UI Navigation, you see this...
    |< < 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 > >|

    You spot a PM from your long-lost lover, and impulsively decide to "Sort by Sender" to see if you have any more old steamy PM's left from your lover... (Bittersweet, we know! But who could resist?!)


    Anyways...

    In this contrived scenario, when you click to "Sort by Sender" (in Ascending Order)...

    1.) What Page do you end up on??

    Do you remain on Page #7 ??

    Do you go back to Page #1 since things have been re-sorted??


    2.) If you stay on Page #7, then...

    What happens to the PM range you were viewing??

    Does the website have to "Sort by Sender (in Ascending Order)", and then figure out where the new Page #7 would be, and then take you back to this New Page #7 ??


    3.) Does some other behavior happen??


    Pretty confusing topic if you think about...

    I thought I was making good progress on programming my first-ever Pagination Module when all of these questions popped into my head?!

    Your answers to my questions above will have a significant impact on how I write my PHP and tweak my SQL!!

    Sincerely,


    Debbie

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    Sometimes the questions in your head present you with problems that really dont exist!

    If I re-sort then I would expect to go back to page #1 as I am looking at different parameters from the original query.
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,530
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spikeZ View Post
    Sometimes the questions in your head present you with problems that really dont exist!

    If I re-sort then I would expect to go back to page #1 as I am looking at different parameters from the original query.
    After creating this thread, that same thought occurred to me.

    Guess I made a big deal out nothing?!

    Thanks,


    Debbie


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •