summaryrefslogtreecommitdiff
path: root/idiorm.php
diff options
context:
space:
mode:
authorJamie Matthews <[email protected]>2010-10-07 01:31:05 +0100
committerJamie Matthews <[email protected]>2010-10-07 01:31:05 +0100
commit69bf5735df7360264ad1763fc5bc303411bd8f6c (patch)
treeb4ffbbc8a36380602bbfa38418c85491515dedc6 /idiorm.php
parent6c9356097dd42cdbc85481a40b7ecd2ce4d3f146 (diff)
Simplify where_raw method. This method can now be used in method chains.
Diffstat (limited to 'idiorm.php')
-rw-r--r--idiorm.php21
1 files changed, 1 insertions, 20 deletions
diff --git a/idiorm.php b/idiorm.php
index 62de812..65e9189 100644
--- a/idiorm.php
+++ b/idiorm.php
@@ -104,15 +104,6 @@
// Array of WHERE clauses
protected $_where_conditions = array();
- // Is the WHERE clause raw?
- protected $_where_is_raw = false;
-
- // Raw WHERE clause
- protected $_raw_where_clause = '';
-
- // Raw WHERE parameters
- protected $_raw_where_parameters = array();
-
// LIMIT
protected $_limit = null;
@@ -425,10 +416,7 @@
* to the parameters supplied in the second argument.
*/
public function where_raw($clause, $parameters) {
- $this->_where_is_raw = true;
- $this->_raw_where_clause = $clause;
- $this->_raw_where_parameters = $parameters;
- return $this;
+ return $this->_add_where($clause, $parameters);
}
/**
@@ -511,13 +499,6 @@
* Build the WHERE clause(s)
*/
protected function _build_where() {
- // If the WHERE clause is raw, just set $this->_values to
- // the raw parameters and return the raw clause.
- if ($this->_where_is_raw) {
- $this->_values = array_merge($this->_values, $this->_raw_where_parameters);
- return "WHERE " . $this->_raw_where_clause;
- }
-
// If there are no WHERE clauses, return empty string
if (count($this->_where_conditions) === 0) {
return '';