0
Codeigniterページング私はデータモデルを使用しています。私は5020のレコードを持っています。ページを開くと、すべてのレコードがロードされ、ページネーションのみが発生しました。だから、ロードに時間がかかります。私はページを直接ページネーションで表示する必要があります。私は誰も私に適した方法をたくさん試してみたCodeigniterデータモデルを使用したページ番号
Codeigniterページング私はデータモデルを使用しています。私は5020のレコードを持っています。ページを開くと、すべてのレコードがロードされ、ページネーションのみが発生しました。だから、ロードに時間がかかります。私はページを直接ページネーションで表示する必要があります。私は誰も私に適した方法をたくさん試してみたCodeigniterデータモデルを使用したページ番号
You need to load pagination library :-
$this->load->library('pagination');
Than you need to set the values according to your choice
$config['per_page']= 10;
$config['uri_segment'] = 4;
$config['base_url'] = site_url('on which page you want to put the pagination').'/';
$this->data['per_page_display'] = $config['per_page'];
$config['total_rows'] = count('Get total records from your model');
$this->data['totalcount'] = $config['total_rows'];
$this->pagination->initialize($config);
$this->data['paginglinks'] = $this->pagination->create_links();
$this->data['per_page'] = $this->uri->segment(4);
$this->data['page'] = $offset;
Than you can use your pagination on your view
ようこそ私には適しています。これまでに試したコードを共有してください。 http://stackoverflow.com/help/how-to-askを参照してください – Daenarys
ページネーションのページングをお試しください[ここをクリック](http://stackoverflow.com/questions/36912816/codeigniter-active-records-query-taking-tooデータベースからの負荷時間データ/ 36914711#36914711)。 –