Welcome Guest, Not a member yet? Register   Sign In
$this->db->limit Problem
#1

[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.


Messages In This Thread
$this->db->limit Problem - by El Forum - 10-31-2008, 02:18 PM
$this->db->limit Problem - by El Forum - 11-01-2008, 03:59 AM
$this->db->limit Problem - by El Forum - 11-02-2008, 05:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB