CodeIgniter Active Record not equal
According to the manual this should work:
Custom key/value method:
You can include an operator in the first parameter in order to control the comparison:
$this->db->where('name !=', $name);$this->db->where('id <', $id);Produces: WHERE name != 'Joe' AND id < 45
Search for $this->db->where();
and look at item #2.
It worked fine with me,
$this->db->where("your_id !=",$your_id);
Or try this one,
$this->db->where("your_id <>",$your_id);
Or try this one,
$this->db->where("your_id IS NOT NULL");
all will work.
Try this code. This seems working in my case.
$this->db->where(array('id !='=> $id))