[eluser]LDMajor[/eluser]
Code:
$this->db->where('to',$this->uri->segment(3));
$this->db->where('picname',0);
$qcm=$this->db->get('comments');
if ($qcm->num_rows() == 0) {
$data['yescomm']=0;
} else {
$data['yescomm']=1;
$perpage=10;
if ($this->uri->segment(4)) {
$page=$this->uri->segment(4);
} else {
$page=1;
}
$nump=$qcm->num_rows();
$nump = $nump / $perpage;
if(intval($nump) != $nump)
$data['nump'] = intval($nump) + 1;
$lim1 = ($page - 1) * $perpage;
$this->db->where('to',$this->uri->segment(3));
$this->db->where('picname',0);
$this->db->limit($lim1, $perpage);
$data['comments']=$this->db->get('comments');
}
I tested the code and without the LIMIT the code works fine
and with it is doesn't select anything!
please help
Dan.