1
0
mirror of synced 2024-12-13 22:56:04 +03:00
This commit is contained in:
zYne 2006-10-29 21:57:47 +00:00
parent 22abc47d40
commit 7e4e5924a4

View File

@ -145,7 +145,7 @@ class Doctrine_Connection_Transaction implements Countable, IteratorAggregate {
$this->conn->getDBH()->beginTransaction(); $this->conn->getDBH()->beginTransaction();
$this->getAttribute(Doctrine::ATTR_LISTENER)->onTransactionBegin($this->conn); $this->conn->getAttribute(Doctrine::ATTR_LISTENER)->onTransactionBegin($this->conn);
} }
try { try {
@ -214,8 +214,14 @@ class Doctrine_Connection_Transaction implements Countable, IteratorAggregate {
} }
if($record instanceof Doctrine_Record) { if($record instanceof Doctrine_Record) {
$params = substr(str_repeat("?, ",count($ids)),0,-2); $params = substr(str_repeat("?, ",count($ids)),0,-2);
$query = "DELETE FROM ".$record->getTable()->getTableName()." WHERE ".$record->getTable()->getIdentifier()." IN(".$params.")";
$this->conn->execute($query,$ids); $query = 'DELETE FROM '
. $record->getTable()->getTableName()
. ' WHERE '
. $record->getTable()->getIdentifier()
. ' IN(' . $params . ')';
$this->conn->execute($query, $ids);
} }
} }