Reputation: 99
Consider this function to retrieve data from DB in Codeigniter:
function popular_list($limit=2)
{
$this->db->select('news.*');
$this->db->where('id',$this->uri->segment(3));
$this->db->where('publish',1);
$this->db->where('viewed',(>=5));
$this->db->order_by('id','DESC');
$this->db->limit($limit);
$query = $this->db->get('news');
return $query->result();
}
I'm getting this parse error:
Parse error: parse error in C:\xampp\htdocs\misnews\application\models\home_model.php on line 113 Line 113 is : $this->db->where('viewed',(>=5));
What am I doing wrong?
Upvotes: 1
Views: 112