Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $config = array();
- $config["base_url"] = base_url() . "/credits";
- $config['total_rows'] = 200;
- $config['per_page'] = 2;
- $config["uri_segment"] = 3;
- $this->pagination->initialize($config);
- $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
- $data["results"] = $this->credits_model->fetch_countries($config["per_page"], $page);
- $data["links"] = $this->pagination->create_links();
- public function record_count() {
- return $this->db->count_all("sadmin_credits");
- }
- public function fetch_countries($limit, $start) {
- $this->db->limit($limit, $start);
- $query = $this->db->get("sadmin_credits");
- if ($query->num_rows() > 0) {
- foreach ($query->result() as $row) {
- $data[] = $row;
- }
- return $data;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement