Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8299855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:19:13+00:00 2026-06-08T16:19:13+00:00

my pagination problem still continue ; I just making pagination in simple stuff :

  • 0

my pagination problem still continue ;

I just making pagination in simple stuff :

        $config['base_url'] = site_url('admin/index/page/');
        $this->load->database();
        $config['total_rows'] = $this->db->count_all('sms');
        $config['per_page'] = 20;
        $offset = $this->uri->segment(4, 0);
        $this->pagination->initialize($config)

And my view page has this command for view pagination :

        <?php echo $this->pagination->create_links(); ?> 

And after more than 20 rows , pagination starts to paging the list, but html output shows like this :

 1 2 3 

As in view , First Page Number 1 does not have link either jumping next page , there is no link on page number 1. Just its on strong .

My second problem is : I have just 30 record but CI pagination creates 3rd page which is coming with empty rows !

I am not sure why some Class ( specially pagination makes so much trouble to users ? ) If i need to pay something ( maybe hidden licence? ) for get away from trouble instead of using simple pagination class without loosing so much time for searching issue on internet , I am ready for it !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T16:19:16+00:00Added an answer on June 8, 2026 at 4:19 pm

    I was very mad because of this pagination problem and I was studying the source code of the pagination library and I saw this — var $uri_segment = 3; The default of the pagination library uses the 3rd uri segment, in your case and in my case we wanted to use the 4th uri segment. To suit our needs change this code:

        $config['base_url'] = site_url('admin/index/page/');
        $this->load->database();
        $config['total_rows'] = $this->db->count_all('sms');
        $config['per_page'] = 20;
        $offset = $this->uri->segment(4, 0);
        $this->pagination->initialize($config)
    
    
       TO
    
    
        $config['base_url'] = site_url('admin/index/page/');
        $this->load->database();
        $config['total_rows'] = $this->db->count_all('sms');
        $config['per_page'] = 20;
        $offset = $this->uri->segment(4, 0);
    
        $config['uri_segment'] = 4;      // add this line to override the default
    
        $this->pagination->initialize($config)
    

    Kindly post back here if this will solve your problem or if the problem still exists so I can help 🙂

    Nwei this is not in the pagination class documentation. I hope this will be added to the docs because I’m seeing many developers having a hard time with the pagination class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with using use_page_numbers config set to true in my pagination
Hello ich have a Problem with my Pagination . The numbers() just show the
I have a similar problem with this ( https://wordpress.stackexchange.com/questions/9593/custom-post-type-archive-with-pagination ) and can't really figure
Hi i have a problem with this asp pagination. it seems to be putting
I really hope someone can help with this problem. I have an ajax pagination
I had a problem on a Jsf page. The datascroller didn't change pagination of
I want to using of the jQuery pagination ,The problem is in this that,
I am using the kaminari pagination gem in my simple Rails 3.1 application. Problem
I have implemented pagination to my data, but the problem is I only have
I just got pagination to work on my site, but I wanted to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.