summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/DB_query_builder.php2
-rw-r--r--system/database/drivers/postgre/postgre_driver.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 7a54fce48..65e2fa749 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -427,7 +427,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$prefix = (count($this->qb_where) === 0 && count($this->qb_cache_where) === 0) ? '' : $type;
$k = $this->_has_operator($k)
- ? $this->protect_identifiers(substr($k, 0, strrpos(rtrim($k), ' ')), FALSE, $escape).strrchr(rtrim($k), ' ')
+ ? $this->protect_identifiers(substr($k, 0, strpos(rtrim($k), ' ')), FALSE, $escape).strchr(rtrim($k), ' ')
: $this->protect_identifiers($k, FALSE, $escape);
if (is_null($v) && ! $this->_has_operator($k))
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index 9cce1a403..ad9ac9000 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -616,7 +616,7 @@ class CI_DB_postgre_driver extends CI_DB {
$prefix = (count($this->qb_where) === 0 && count($this->qb_cache_where) === 0) ? '' : $type;
$k = $this->_has_operator($k)
- ? $this->protect_identifiers(substr($k, 0, strrpos(rtrim($k), ' ')), FALSE, $escape).strrchr(rtrim($k), ' ')
+ ? $this->protect_identifiers(substr($k, 0, strpos(rtrim($k), ' ')), FALSE, $escape).strchr(rtrim($k), ' ')
: $this->protect_identifiers($k, FALSE, $escape);
if (is_null($v) && ! $this->_has_operator($k))