15
Dec
Learn how to generate “not equal” sql with CodeIgniter Active Record
In CodeIgniter using active record, if you want to perform a not equal then, use following line.
$this->db->where('name !=', $name); $this->db->where('id <', $id); Produces: WHERE name != 'learn' AND id < 15
In Manual,
Custom key/value method: You can include an operator in the first parameter in order to control the comparison: