BuddyDev

Search

Show Last Pagination by default in PHP

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #8339

    Hi, there

    Thanks so much for previous helps.

    This question is not about WordPress but related to PHP.

    Currently I output all records in a database table and use ceil() etc. methods to split them into different pagination. The link will be xxx.com?page=1, xxx.com?page=2, … , xxx.com?page=x.

    The last pagination “x” is calculated based on total records / per_records_page. However, I’m wondering is there any way to show last pagination by default when visit the xxx.com. Just save a work to click “Last Pagination” link. I tried to reverse but it will display as DESC. That is not what I want.

    Thank you very much.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #8353

    Hi Dandy,
    Thank you for posting. did you mean showing last N entries?

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #8355
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #8357

    Hi Dandy,
    I am very sorry but I am still not able to understand what you want to accomplish here. Please help me understand and I can assist.

    here is what I am thinking
    – There are x items
    – You are showing n items per page
    – There is K paginated pages

    Now, you are listing the K paginated pages as links and also displaying the last n1 items which is for K(th) page?

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #8358
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #8370
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #8374
    This reply has been marked as private.

You must be logged in to reply to this topic.

This topic is: not resolved