how to add an offset and limit with join query? <p>I'm new to codeigniter ,and I have done the below code </p> <pre><code>public function members($limit, $offset) { $this-&gt;load-&gt;model('Management/Member_model', 'member'); $this-&gt;db-&gt;reset_query(); $this-&gt;db-&gt;select('*'); $this-&gt;db-&gt;from($this-&gt;member-&gt;table); $this-&gt;db-&gt;join('ib_communities_dtl','ib_communities_dtl.dtl_user_id='.$this-&gt;member-&gt;table.'.user_id','inner'); $this-&gt;db-&gt;join('ib_communities','ib_communities_dtl.dtl_community_id=ib_communities.community_id','inner'); $this-&gt;db-&gt;where('ib_communities.community_id', $this-&gt;community_id); return $this-&gt;db-&gt;get()-&gt;result('Member_model'); } </code></pre> <p>I want to add offset and limit to the above query , can anyone help me modify it to accomplish that?</p> <p>Thanks in advance </p>