Welcome Guest, Not a member yet? Register   Sign In
$this->db->limit() working differently?
#3

MySQL data fetch query as limit and offset. You can use this code for limit query
function getRecords($searchData)
{
$search_index = '2';
$limit = "10";
$this->db->limit($limit,$search_index);
$this->db->where('status','Active');
$this->db->order_by($this->table.'.add_date', 'desc');
$this->db->where('approve_status','Approved');
$this->db->where('type','Blog');
$query = $this->db->get($this->table);
$result = $query->result();
return $result;
}
Reply


Messages In This Thread
RE: $this->db->limit() working differently? - by XtreemDeveloper - 12-21-2017, 10:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB