Codeigniter mysql where not equal to query/ Where Not Equal To
What happen if you want a field from mysql in which field will not be equal to any particular data.
Suppose you want to fetch data from mysql db in which id is not equal to 4 (id != 4 ).
So simply use the following syntax:
$this->db->where(‘FIELD_NAME !=’ , DATA_VALUE);
example :- $this->db->where(‘is !=’ , 4);