where_not_in condition in Codeigniter

The 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 AND if appropriate.

Let’s create a where_not_in method in codeigniter

$id= array('10', '20', '30');
$this->db->where_not_in('id', $id);
// Produces: WHERE idNOT IN ('10', '20', '30')

Leave a Reply

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