or_where_not_in condition in Codeigniter

The or_where_not_in methods allows you to specify multiple values in a WHERE clause. Generates a WHERE field NOT IN (‘item’, ‘item’) SQL query joined with OR if appropriate.

Let’s create a or_where_not_in method in codeigniter

$id = array('10', '20', '30');
$this->db->or_where_not_in('id', $id);
// Produces: OR id NOT IN ('10', '20', '30')

Leave a Reply

Your email address will not be published. Required fields are marked *