diff options
author | Andrey Andreev <narf@devilix.net> | 2014-08-26 10:59:02 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-08-26 10:59:02 +0200 |
commit | 8adf5e82864e54b8538d03bbba98ae9bb47092bd (patch) | |
tree | 400cb14f12135507667cab67149a08e7909a5676 /system/database | |
parent | a0c3ce3162aadcc017e3dad29ac7df6e5011c4f1 (diff) | |
parent | 516f59c855c969cfcdbc83bb1a2f4180e8cf9271 (diff) |
Merge pull request #3195 from hArpanet/develop
ibase_driver returning whitespace in table/column names
Diffstat (limited to 'system/database')
-rw-r--r-- | system/database/drivers/ibase/ibase_driver.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php index b19985c37..f4e5aef7c 100644 --- a/system/database/drivers/ibase/ibase_driver.php +++ b/system/database/drivers/ibase/ibase_driver.php @@ -219,11 +219,11 @@ class CI_DB_ibase_driver extends CI_DB { */ protected function _list_tables($prefix_limit = FALSE) { - $sql = 'SELECT "RDB$RELATION_NAME" FROM "RDB$RELATIONS" WHERE "RDB$RELATION_NAME" NOT LIKE \'RDB$%\' AND "RDB$RELATION_NAME" NOT LIKE \'MON$%\''; + $sql = 'SELECT TRIM("RDB$RELATION_NAME") AS TABLE_NAME FROM "RDB$RELATIONS" WHERE "RDB$RELATION_NAME" NOT LIKE \'RDB$%\' AND "RDB$RELATION_NAME" NOT LIKE \'MON$%\''; if ($prefix_limit !== FALSE && $this->dbprefix !== '') { - return $sql.' AND "RDB$RELATION_NAME" LIKE \''.$this->escape_like_str($this->dbprefix)."%' " + return $sql.' AND TRIM("RDB$RELATION_NAME") AS TABLE_NAME LIKE \''.$this->escape_like_str($this->dbprefix)."%' " .sprintf($this->_like_escape_str, $this->_like_escape_chr); } @@ -242,7 +242,7 @@ class CI_DB_ibase_driver extends CI_DB { */ protected function _list_columns($table = '') { - return 'SELECT "RDB$FIELD_NAME" FROM "RDB$RELATION_FIELDS" WHERE "RDB$RELATION_NAME" = '.$this->escape($table); + return 'SELECT TRIM("RDB$FIELD_NAME") AS COLUMN_NAME FROM "RDB$RELATION_FIELDS" WHERE "RDB$RELATION_NAME" = '.$this->escape($table); } // -------------------------------------------------------------------- |