Moved the _has_operators() function into DB_driver from DB_active_rec.
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index eeaf6ea..60f51d7 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -933,7 +933,9 @@
function update_string($table, $data, $where)
{
if ($where == '')
+ {
return false;
+ }
$fields = array();
foreach($data as $key => $val)
@@ -972,6 +974,26 @@
// --------------------------------------------------------------------
/**
+ * Tests whether the string has an SQL operator
+ *
+ * @access private
+ * @param string
+ * @return bool
+ */
+ function _has_operator($str)
+ {
+ $str = trim($str);
+ if ( ! preg_match("/(\s|<|>|!|=|is null|is not null)/i", $str))
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Prep the table name - simply adds the table prefix if needed
*
* @access public