diff --git a/sys/db/db_pdo.php b/sys/db/db_pdo.php index b14cd1a..4ffdc98 100644 --- a/sys/db/db_pdo.php +++ b/sys/db/db_pdo.php @@ -23,6 +23,7 @@ abstract class DB_PDO extends PDO { public $manip; protected $statement; + protected $escape_char = '"'; /** * PDO constructor wrapper @@ -172,7 +173,9 @@ abstract class DB_PDO extends PDO { // Split each identifier by the period $hiers = explode('.', $ident); - return '"'.implode('"."', $hiers).'"'; + return $this->escape_char . + implode("{$this->escape_char}.{$this->escape_char}", $hiers) . + $this->escape_char; } // ------------------------------------------------------------------------- diff --git a/sys/db/drivers/mysql/mysql_driver.php b/sys/db/drivers/mysql/mysql_driver.php index d76e319..0bdbfee 100644 --- a/sys/db/drivers/mysql/mysql_driver.php +++ b/sys/db/drivers/mysql/mysql_driver.php @@ -19,6 +19,8 @@ */ class MySQL extends DB_PDO { + protected $escape_char = '`'; + /** * Connect to MySQL Database * @@ -83,26 +85,5 @@ class MySQL extends DB_PDO { { return isset($this->statement) ? $this->statement->rowCount() : FALSE; } - - // -------------------------------------------------------------------------- - - /** - * Surrounds the string with the databases identifier escape characters - * - * @param string $ident - * @return string - */ - public function quote_ident($ident) - { - if (is_array($ident)) - { - return array_map(array($this, 'quote_ident'), $ident); - } - - // Split each identifier by the period - $hiers = explode('.', $ident); - - return '`'.implode('`.`', $hiers).'`'; - } } //End of mysql_driver.php \ No newline at end of file diff --git a/tests/test_dbs/FB_TEST_DB.FDB b/tests/test_dbs/FB_TEST_DB.FDB index 2cc7d47..1983a70 100755 Binary files a/tests/test_dbs/FB_TEST_DB.FDB and b/tests/test_dbs/FB_TEST_DB.FDB differ