diff --git a/model/SqlDbDriver.php b/model/SqlDbDriver.php index d45119a..e555c19 100644 --- a/model/SqlDbDriver.php +++ b/model/SqlDbDriver.php @@ -110,7 +110,9 @@ abstract class SqlDbDriver extends DbDriver { $ident = explode('.', $ident); foreach ($ident as &$segment) { - $segment = $this->identifier_quote . $segment . $this->identifier_quote; + if (!preg_match('/(\?|:[A-z0-9_]+)/u', $segment)) { + $segment = $this->identifier_quote . $segment . $this->identifier_quote; + } } return implode('.', $ident); } @@ -141,7 +143,7 @@ abstract class SqlDbDriver extends DbDriver foreach ($where as $cond => &$term) { if (is_int($cond)) { if (is_int($term)) { - throw new ErrorException('Condition in where expression as integer. Dangerous. ' . $term); + throw new ErrorException('Condition in where expression as integer. ' . $term); } if ($term instanceof DbExpr) { $term = (string) $term;