core/MY_Model.php
public function delete_many($primary_values)
    {
        $primary_values = $this->trigger('before_delete', $primary_values);

        $this->_database->where_in($this->primary_key, $primary_values);

        if ($this->soft_delete)
        {
            $result = $this->_database->update($this->_table, array( $this->soft_delete_key => TRUE ));
        }
        else
        {
            $result = $this->_database->delete($this->_table);
        }

        $this->trigger('after_delete', $result);

        return $result;
    }
public function delete_many($primary_values)
    {
        $primary_values = $this->trigger('before_delete', $primary_values);

        $this->_database->where_in($this->primary_key, $primary_values);

        if ($this->soft_delete)
        {
            $result = $this->_database->update($this->_table, array( $this->soft_delete_key => TRUE ));
        }
        else
        {
            $result = $this->_database->delete($this->_table);
        }

        $this->trigger('after_delete', $result);

        return $result;
    }
public function delete_many ( $ primary_values ) { $ primary_values = $ this -> trigger ( 'before_delete' , $ primary_values ) ; $ this -> _database -> where_in ( $ this -> primary_key , $ primary_values ) ; if ( $ this -> soft_delete ) { $ result = $ this -> _database -> update ( $ this -> _table , array ( $ this -> soft_delete_key => TRUE ) ) ; } else { $ result = $ this -> _database -> delete ( $ this -> _table ) ; } $ this -> trigger ( 'after_delete' , $ result ) ; return $ result ; }
Delete many rows from the database table by multiple primary values
Delete many rows from the database table by multiple primary values