• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pagination WHERE ?

#1
Hi guys,

Is the built-in pagination class can handle pagination with WHERE condition?

example codes;
Code:
public function fetch_blog_by_user($limit, $start, $id2) {
        $q = $this->db->select('blog_id, user_id, title')
                         ->from($this->table_name)
                         ->where('user_id', $id2)
                         ->limit($limit, $start)
                         ->get();          

        if ($q->num_rows() > 0) {
            foreach ($q->result() as $row) {
                $data[] = $row;
            }
            return $data;
        }
        return false;
   }

thanks in advance.
No SEO spam
Reply


Messages In This Thread
Pagination WHERE ? - by solidcodes - 12-23-2015, 12:35 AM
RE: Pagination WHERE ? - by Martin7483 - 12-23-2015, 02:56 AM
RE: Pagination WHERE ? - by solidcodes - 12-23-2015, 05:07 AM
RE: Pagination WHERE ? - by Martin7483 - 12-31-2015, 04:05 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.