diff --git a/classes/db_pdo.php b/classes/db_pdo.php index 8e26a0c..c724670 100644 --- a/classes/db_pdo.php +++ b/classes/db_pdo.php @@ -279,8 +279,23 @@ abstract class DB_PDO extends PDO { $hiers = explode('.', $ident); $hiers = array_map('mb_trim', $hiers); - // Return the re-compiled string - return implode('.', array_map(array($this, '_quote'), $hiers)); + // Re-compile the string + $raw = implode('.', array_map(array($this, '_quote'), $hiers)); + + // Fix functions + $funcs = array(); + preg_match_all("#{$this->escape_char}([a-zA-Z0-9_]+(\((.*?)\))){$this->escape_char}#iu", $raw, $funcs, PREG_SET_ORDER); + foreach($funcs as $f) + { + // Unquote the function + $raw = str_replace($f[0], $f[1], $raw); + + // Quote the inside identifiers + $raw = str_replace($f[3], $this->quote_ident($f[3]), $raw); + } + + return $raw; + } // -------------------------------------------------------------------------- diff --git a/docs/classes/BadConnectionException.html b/docs/classes/BadConnectionException.html index 9085c7d..8e86e5e 100644 --- a/docs/classes/BadConnectionException.html +++ b/docs/classes/BadConnectionException.html @@ -219,7 +219,7 @@
+ generated on 2013-04-25T08:15:20-04:00.