summaryrefslogtreecommitdiff
path: root/idiorm.php
diff options
context:
space:
mode:
authorJamie Matthews <[email protected]>2010-09-14 04:03:39 +0100
committerJamie Matthews <[email protected]>2010-09-14 04:03:39 +0100
commit674d83234273ee9cf263c1278b96272a0f71e758 (patch)
treeedb6c1f317879e970036793a316c32b6cb171596 /idiorm.php
parent80c5136a539050896aa2901abcd91766d622f1e6 (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.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/idiorm.php b/idiorm.php
index 365fa00..89ddd1a 100644
--- a/idiorm.php
+++ b/idiorm.php
@@ -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