codeigniter 3 or where not in

$this->db->where_not_in('column_name', $array_of_values);
$query = $this->db->get('table_name');

Explanation:

  1. $this->db->where_not_in('column_name', $array_of_values);: This line sets up a WHERE NOT IN condition in the database query. It specifies that the values in the specified column should not be in the given array of values.

  2. $query = $this->db->get('table_name');: This line executes the database query, retrieving data from the specified table (table_name) based on the conditions set in the where_not_in clause. The result is stored in the $query variable.

Note: Replace 'column_name' with the actual name of the column you want to apply the WHERE NOT IN condition to, replace $array_of_values with the array of values you want to exclude, and replace 'table_name' with the actual name of your database table.