diff options
author | Jamie Matthews <[email protected]> | 2010-09-14 04:03:39 +0100 |
---|---|---|
committer | Jamie Matthews <[email protected]> | 2010-09-14 04:03:39 +0100 |
commit | 674d83234273ee9cf263c1278b96272a0f71e758 (patch) | |
tree | edb6c1f317879e970036793a316c32b6cb171596 /idiorm.php | |
parent | 80c5136a539050896aa2901abcd91766d622f1e6 (diff) |
Add code, tests and docs for inequality operators: where_gt, where_lt, where_gte, where_lte
Diffstat (limited to 'idiorm.php')
-rw-r--r-- | idiorm.php | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -341,6 +341,33 @@ return $this->add_where($column_name, $value, 'LIKE'); } + /** + * Add a WHERE ... > clause to your query + */ + public function where_gt($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, '<'); + } + + /** + * Add a WHERE ... >= clause to your query + */ + public function where_gte($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, '<='); + } /** * Add a raw WHERE clause to the query. The clause should |