How to delete multiple rows?
codeigniter, database
Solution
Have you tried this ?
$names = array(4,5);
$this->db->where_in('id', $names);
$this->db->delete('mytable');
Problem
So I can delete one row using: ``` $this->db->delete($tableName,array("id"=>4)); ``` ...but I can't figure out how to delete multiple rows. I tried: ``` $this->db->delete($tableName,array("id"=>4,"id"=5)); ``` as well as: ``` $this->db->delete($tableName,array(array("id"=>4),array("id"=5))); ``` ...but they both don't work. I feel like this should be pretty easy. Any answers?