0
我用笨分頁類進行分頁我的記錄,下面你可以看到我的代碼分頁鏈接不是笨分頁顯示
$data['success'] = "";
$data['error'] = "";
$data['offset'] = 0;
$this->load->library('pagination');
$per_page = 4;
$total = $this->m_workshop->totalworkshoppay();
$baseUrl = site_url('sitemanager/workshop/workshopayment');
$data['query'] = $this->m_workshop->getallwpay($per_page, (int) $this->uri->segment(4));
$confignew['base_url'] = $baseUrl;
$confignew['total_rows'] = $total;
$confignew['per_page'] = $per_page;
$confignew['uri_segment'] = '4';
$this->pagination->initialize($confignew);
$data['offset'] = (int) $this->uri->segment(4);
$this->load->view('sitemanager/workshop/viewallworkshoppay',$data);
我用<?php echo $this->pagination->create_links(); ?>
代碼在我看來,頁面顯示分頁links.But的分頁鏈接不顯示在瀏覽器中。當我打印$data['query']
時,記錄根據$per_page
變化限制。
如果你有數據記錄不到'per_page',該'create_links'將不會出現。 – MSI