diff options
-rw-r--r-- | kohana/libraries/Database.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kohana/libraries/Database.php b/kohana/libraries/Database.php index 7c484465..adbbcf56 100644 --- a/kohana/libraries/Database.php +++ b/kohana/libraries/Database.php @@ -299,7 +299,7 @@ class Database_Core { { if (preg_match('/^DISTINCT\s++(.+)$/i', $val, $matches)) { - $val = $this->config['table_prefix'].$matches[1]; + $val = (strpos($matches[1], '.') !== FALSE) ? $this->config['table_prefix'].$matches[1] : $matches[1]; $this->distinct = TRUE; } else |