summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-01-12 17:18:02 +0100
committerDerek Allard <derek.allard@ellislab.com>2008-01-12 17:18:02 +0100
commit67b44edaf539245ca12789f19cca1e7a9437f4f3 (patch)
tree2656568b94be0fdf8d95e46dcc146836d7a88f3e /system
parent36731bcfd27a965b3f3ee18608478eced5282510 (diff)
added raw_where() and raw_or_where() into AR
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_active_rec.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index b9594050e..683ded0a7 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -207,6 +207,44 @@ class CI_DB_active_record extends CI_DB_driver {
// --------------------------------------------------------------------
/**
+ * Raw Where
+ *
+ * Generates an unfiltered WHERE portion of the query.
+ * Separates multiple calls with AND
+ *
+ * @access public
+ * @param string
+ * @return string
+ */
+ function raw_where($statement)
+ {
+ $prefix = (count($this->ar_where) == 0) ? '' : ' AND ';
+ $this->ar_where[] = $prefix.$statement;
+ return $statement;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Raw OR Where
+ *
+ * Generates an unfiltered WHERE portion of the query.
+ * Separates multiple calls with OR
+ *
+ * @access public
+ * @param string
+ * @return string
+ */
+ function raw_or_where($statement)
+ {
+ $prefix = (count($this->ar_where) == 0) ? '' : ' OR ';
+ $this->ar_where[] = $prefix.$statement;
+ return $statement;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Where
*
* Called by where() or orwhere()