diff options
author | Jamie Matthews <[email protected]> | 2010-09-14 04:06:51 +0100 |
---|---|---|
committer | Jamie Matthews <[email protected]> | 2010-09-14 04:06:51 +0100 |
commit | 1af4f71308ec20e86c15af3c23ed2b7ae95d02a2 (patch) | |
tree | 8559a51cdb0e3858782fed5a5dd028acb02e3f61 /idiorm.php | |
parent | 674d83234273ee9cf263c1278b96272a0f71e758 (diff) |
Change order of arguments to add_where method
Diffstat (limited to 'idiorm.php')
-rw-r--r-- | idiorm.php | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -307,11 +307,11 @@ * Class constants defined above should be used to provide the * $operator argument. */ - private function add_where($column_name, $value, $operator) { + private function add_where($column_name, $operator, $value) { $this->where[] = array( self::WHERE_COLUMN_NAME => $column_name, + self::WHERE_OPERATOR => $operator, self::WHERE_VALUE => $value, - self::WHERE_OPERATOR => $operator ); return $this; } @@ -331,42 +331,42 @@ * Can be used if preferred. */ public function where_equals($column_name, $value) { - return $this->add_where($column_name, $value, '='); + return $this->add_where($column_name, '=', $value); } /** * Add a WHERE ... LIKE clause to your query. */ public function where_like($column_name, $value) { - return $this->add_where($column_name, $value, 'LIKE'); + return $this->add_where($column_name, 'LIKE', $value); } /** * Add a WHERE ... > clause to your query */ public function where_gt($column_name, $value) { - return $this->add_where($column_name, $value, '>'); + return $this->add_where($column_name, '>', $value); } /** * Add a WHERE ... < clause to your query */ public function where_lt($column_name, $value) { - return $this->add_where($column_name, $value, '<'); + return $this->add_where($column_name, '<', $value); } /** * Add a WHERE ... >= clause to your query */ public function where_gte($column_name, $value) { - return $this->add_where($column_name, $value, '>='); + return $this->add_where($column_name, '>=', $value); } /** * Add a WHERE ... <= clause to your query */ public function where_lte($column_name, $value) { - return $this->add_where($column_name, $value, '<='); + return $this->add_where($column_name, '<=', $value); } /** |