Fix _where() with multiple condition custom query
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 7a54fce..65e2fa7 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -427,7 +427,7 @@
$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 9cce1a4..ad9ac90 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -616,7 +616,7 @@
$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))