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 ...@@ -130,19 +130,15 @@ class Doctrine_Transaction extends Doctrine_Connection_Module
if (is_array($deletes[count($deletes)-1]->getTable()->getIdentifier())) { if (is_array($deletes[count($deletes)-1]->getTable()->getIdentifier())) {
foreach($deletes as $k => $record) { foreach($deletes as $k => $record) {
$cond = ''; $cond = array();
$ids = $record->obtainIdentifier(); $ids = $record->obtainIdentifier();
$query = 'DELETE FROM '.$record->getTable()->getTableName().' WHERE '; $query = 'DELETE FROM '.$record->getTable()->getTableName().' WHERE ';
foreach(array_keys($ids) as $id ){ foreach (array_keys($ids) as $id){
if ($cond) { $cond[] = $id . ' = ? ';
$cond .= " AND ";
} }
$cond .= " $id = ? "; $query = $query . implode(' AND ', $cond);
}
$query = $query . $cond;
$this->conn->execute($query, array_values($ids)); $this->conn->execute($query, array_values($ids));
} }
} else { } 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