From c5eb26c3ba448465974c396e756d9039311ce224 Mon Sep 17 00:00:00 2001 From: zYne Date: Wed, 18 Apr 2007 09:47:02 +0000 Subject: [PATCH] identifier quoting fix --- lib/Doctrine/Connection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/Connection.php b/lib/Doctrine/Connection.php index af8379968..92d91e0f3 100644 --- a/lib/Doctrine/Connection.php +++ b/lib/Doctrine/Connection.php @@ -461,7 +461,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun } } - $query = 'DELETE FROM '. $table . ' WHERE ' . implode(' AND ', $condition); + $query = 'DELETE FROM ' . $this->quoteIdentifier($table) . ' WHERE ' . implode(' AND ', $condition); $affectedRows = $this->exec($query); $this->insert($table, $values); @@ -486,7 +486,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $cols = array_keys($values); // build the statement - $query = "INSERT INTO $table " + $query = 'INSERT INTO ' . $this->quoteIdentifier($table) . '(' . implode(', ', $cols) . ') ' . 'VALUES (' . substr(str_repeat('?, ', count($values)), 0, -2) . ')';