Reputation: 12998
I have found this codeigniter active record query where I can delete items in an array
$this->db->delete('stack', array('id' => $id))
However, I would like to delete items which are not in the array.
Is this possible.?
Upvotes: 3
Views: 11682
Reputation: 1249
This should do the trick:
$this->db->where_not_in('id', $ids);
$this->db->delete('stack');
Upvotes: 9