summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-03-02 00:14:43 +0100
committerDerek Allard <derek.allard@ellislab.com>2008-03-02 00:14:43 +0100
commit43e8cbf51bfdca8bc29acc23208f1018d7af913a (patch)
tree6555b502806a60e216b6f6ab74b2508cb00f7036
parent3951e8e3c56e9ddef2048350bde8b39cbef1568a (diff)
added or_having, deprecated orhaving
-rw-r--r--system/database/DB_active_rec.php16
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 ');
}