代码点火器分页

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了代码点火器分页相关的知识,希望对你有一定的参考价值。

make pagination for dataview in model
  1. function get_data_eJIC_page($start=0, $per_page=0){
  2. //pagination
  3. $config['base_url'] = base_url().'index.php/digital/index';
  4. $config['total_rows'] = $this->db->get('konver')->num_rows();
  5. $config['per_page'] = $per_page;
  6. $config['full_tag_open'] = '<ul class="pagination">';
  7. $config['full_tag_close'] = '</ul>';
  8. $config['num_links'] = 10;
  9. $config['first_link'] = 'Awal';
  10. $config['last_link'] = 'Akhir';
  11. $config['first_tag_open'] = '<li>';
  12. $config['first_tag_close'] = '</li>';
  13. $config['last_tag_open'] = '<li>';
  14. $config['last_tag_close'] = '</li>';
  15. $config['next_tag_open'] = '<li>';
  16. $config['next_tag_close'] = '</li>';
  17. $config['prev_tag_open'] = '<li>';
  18. $config['prev_tag_close'] = '</li>';
  19. $config['num_tag_open'] = '<li>';
  20. $config['num_tag_close'] = '</li>';
  21. $this->pagination->initialize($config);
  22. //end
  23.  
  24. if($per_page > 0){
  25. $this->db->from('konver');
  26. $this->db->limit($per_page, $start);
  27. $data = $this->db->get();
  28. }else{
  29. $data = $this->db->get('konver');
  30. }
  31.  
  32. return $data;
  33. }

以上是关于代码点火器分页的主要内容,如果未能解决你的问题,请参考以下文章

代码点火器错误“地址不被理解”

在代码点火器中调用帮助程序和库的方法有区别吗?

404 index() 函数代码点火器

代码点火器 URL 更改

代码点火器 + CSS

Ajax CSRF 403 禁止代码点火器