summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/odbc/odbc_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/odbc/odbc_driver.php')
-rw-r--r--system/database/drivers/odbc/odbc_driver.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index 03c0e6a86..88fff4365 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -424,6 +424,13 @@ class CI_DB_odbc_driver extends CI_DB {
// we may need "`item1` `item2`" and not "`item1 item2`"
if (ctype_alnum($item) === FALSE)
{
+ if (strpos($item, '.') !== FALSE)
+ {
+ $aliased_tables = implode(".",$this->ar_aliased_tables).'.';
+ $table_name = substr($item, 0, strpos($item, '.')+1);
+ $item = (strpos($aliased_tables, $table_name) !== FALSE) ? $item = $item : $this->dbprefix.$item;
+ }
+
// This function may get "field >= 1", and need it to return "`field` >= 1"
$lbound = ($first_word_only === TRUE) ? '' : '|\s|\(';