[eluser]Computerzworld[/eluser]
Hello,
I am having one query & one pagination query & I want to use only one where condition between two.Here is my code.
Code:
$this->db->where('isDeleted',0);
if($this->paginate==TRUE)
{
$this->total = $this->db->count_all_results("mytable");
$this->numpages = ceil($this->total / $this->limit);
$offset = ($this->page * $this->limit) - $this->limit;
$this->db->limit($this->limit, $offset);
}
$query = $this->db->get("mytable");
But this where conditon applies to only $this->db->count_all_results() condition & not $this->db->get(). Is it possible to use that in common between these two? If yes then how? Please help me. Thanks in advance.