I am really sorry to ask this silly question but I am a bit confused about the query.
$this->db->select('user_package.status,user_package.remaining,user_package.date,package.pname,package.pcount');
$this->db->join('user_package','user_package.pid=package.pid','left');
$this->db->where('user_package.status','Active');
$this->db->or_where('user_package.status','Pending');
$this->db->where('user_package.uid',$rows->uid);
$user_package=$this->db->get('package');
and here is the similar query in mysql panel which i run for result to check the out put
Select up.status,up.remaining,up.date,p.pname,up.uid,p.pcount FROM user_package up LEFT JOIN package p ON up.pid=p.pid where up.status="Active" OR up.status="Pending" AND up.uid=7
and here is the output of the query
What i want is that find only those rows whose uid is 7 and check if their status is Pending or Active. but the output is different. it takes out Pending and Active records with 7 and 8 uid.