diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-05-22 15:01:39 +0200 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-05-22 15:01:39 +0200 |
commit | a459b46e7a5f67a96d0ea85e0778f1bf8858dbdd (patch) | |
tree | fef9c530260ea06155bbe931a1f4a187a2881529 /system/database/DB_active_rec.php | |
parent | 908ecc6144ec1d21922cfaf8b7826e8faba4c610 (diff) |
Fixed a bug (#4561) where orhaving() wasn't properly passing values.
Removed some unused variables from the code (#4563).
Fixed a bug where having() was not adding an = into the statement (#4568).
Diffstat (limited to 'system/database/DB_active_rec.php')
-rw-r--r-- | system/database/DB_active_rec.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index dcf9d3868..05a04350d 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -804,7 +804,7 @@ class CI_DB_active_record extends CI_DB_driver { function orhaving($key, $value = '', $escape = TRUE)
{
- return $this->or_having($key, $value = '', $escape);
+ return $this->or_having($key, $value, $escape);
}
// --------------------------------------------------------------------
@@ -852,7 +852,11 @@ class CI_DB_active_record extends CI_DB_driver { $k = $this->_protect_identifiers($k);
}
-
+ if ( ! $this->_has_operator($k))
+ {
+ $k .= ' = ';
+ }
+
if ($v != '')
{
$v = ' '.$this->escape_str($v);
|