Commit 34cce3e0 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 907156fd
......@@ -130,19 +130,15 @@ class Doctrine_Transaction extends Doctrine_Connection_Module
if (is_array($deletes[count($deletes)-1]->getTable()->getIdentifier())) {
foreach($deletes as $k => $record) {
$cond = '';
$cond = array();
$ids = $record->obtainIdentifier();
$query = 'DELETE FROM '.$record->getTable()->getTableName().' WHERE ';
foreach(array_keys($ids) as $id ){
if ($cond) {
$cond .= " AND ";
foreach (array_keys($ids) as $id){
$cond[] = $id . ' = ? ';
}
$cond .= " $id = ? ";
}
$query = $query . $cond;
$query = $query . implode(' AND ', $cond);
$this->conn->execute($query, array_values($ids));
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment