summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/ibase/ibase_driver.php
diff options
context:
space:
mode:
authorhArpanet <github@harpanet.com>2014-08-26 10:46:52 +0200
committerhArpanet <github@harpanet.com>2014-08-26 10:46:52 +0200
commit516f59c855c969cfcdbc83bb1a2f4180e8cf9271 (patch)
tree0ae9f61fdfb8b02b81b79c89feef1c3cfdb2f42d /system/database/drivers/ibase/ibase_driver.php
parentd07daa54d991e38ccdcf41c4f9d90f307c5ecbc1 (diff)
ibase_driver add table/column aliases
to satisfy DB_driver expectations
Diffstat (limited to 'system/database/drivers/ibase/ibase_driver.php')
-rw-r--r--system/database/drivers/ibase/ibase_driver.php6
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 8f10c1f1d..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 TRIM("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 TRIM("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 TRIM("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);
}
// --------------------------------------------------------------------