diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-03-02 00:14:43 +0100 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-03-02 00:14:43 +0100 |
commit | 43e8cbf51bfdca8bc29acc23208f1018d7af913a (patch) | |
tree | 6555b502806a60e216b6f6ab74b2508cb00f7036 | |
parent | 3951e8e3c56e9ddef2048350bde8b39cbef1568a (diff) |
added or_having, deprecated orhaving
-rw-r--r-- | system/database/DB_active_rec.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 903584200..b97fb11cd 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -779,7 +779,19 @@ class CI_DB_active_record extends CI_DB_driver { {
return $this->_having($key, $value, 'AND ');
}
-
+
+ // --------------------------------------------------------------------
+
+ /**
+ * orhaving() is an alias of or_having()
+ * this function is here for backwards compatibility, as
+ * orhaving() has been deprecated
+ */
+
+ function orhaving($key, $value = '')
+ {
+ return $this->or_havinggroup_by($key, $value = '');
+ }
// --------------------------------------------------------------------
/**
@@ -792,7 +804,7 @@ class CI_DB_active_record extends CI_DB_driver { * @param string
* @return object
*/
- function orhaving($key, $value = '')
+ function or_having($key, $value = '')
{
return $this->_having($key, $value, 'OR ');
}
|