diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-05-18 14:23:11 +0200 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-05-18 14:23:11 +0200 |
commit | 513ce070bfcbb2b59d0aabd1732b7666b90b4d83 (patch) | |
tree | e9668a7ecdbbe64ca2e80125e3e873f589669522 /system | |
parent | c8b21742927c217770e950005741850f17b5d32c (diff) |
Moved the _has_operators() function into DB_driver from DB_active_rec.
Diffstat (limited to 'system')
-rw-r--r-- | system/database/DB_active_rec.php | 20 | ||||
-rw-r--r-- | system/database/DB_driver.php | 22 |
2 files changed, 22 insertions, 20 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 3cb39822c..dcf9d3868 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -1394,27 +1394,7 @@ class CI_DB_active_record extends CI_DB_driver { {
return $this->from($table);
}
-
- // --------------------------------------------------------------------
-
- /**
- * 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;
- }
-
// --------------------------------------------------------------------
/**
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index eeaf6ea78..60f51d757 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -933,7 +933,9 @@ class CI_DB_driver { function update_string($table, $data, $where)
{
if ($where == '')
+ {
return false;
+ }
$fields = array();
foreach($data as $key => $val)
@@ -972,6 +974,26 @@ class CI_DB_driver { // --------------------------------------------------------------------
/**
+ * 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
|