Commit c5eb26c3 authored by zYne's avatar zYne

identifier quoting fix

parent 707f8015
...@@ -461,7 +461,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun ...@@ -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); $affectedRows = $this->exec($query);
$this->insert($table, $values); $this->insert($table, $values);
...@@ -486,7 +486,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun ...@@ -486,7 +486,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
$cols = array_keys($values); $cols = array_keys($values);
// build the statement // build the statement
$query = "INSERT INTO $table " $query = 'INSERT INTO ' . $this->quoteIdentifier($table)
. '(' . implode(', ', $cols) . ') ' . '(' . implode(', ', $cols) . ') '
. 'VALUES (' . substr(str_repeat('?, ', count($values)), 0, -2) . ')'; . 'VALUES (' . substr(str_repeat('?, ', count($values)), 0, -2) . ')';
......
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