summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorJamie Matthews <[email protected]>2010-09-16 00:19:53 +0100
committerJamie Matthews <[email protected]>2010-09-16 00:19:53 +0100
commit94a63bfab8a02cd31a1705a32455a7ce17da1f0d (patch)
tree08da1a4e2256651cb7e48218bc0190a388b0b369 /README.markdown
parent5c59aa72dc5403bf3df900e5c29e8b8620d1b98a (diff)
Add where_not_like method, docs and test
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown6
1 files changed, 5 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown
index 3be2004..0ca2630 100644
--- a/README.markdown
+++ b/README.markdown
@@ -118,12 +118,16 @@ There are four methods available for inequalities:
* Less than or equal: `$people = ORM::for_table('person')->where_lte('age', 10)->find_many();`
* Greater than or equal: `$people = ORM::for_table('person')->where_gte('age', 5)->find_many();`
-##### String comparision: `where_like` #####
+##### String comparision: `where_like` and `where_not_like` #####
To add a `WHERE ... LIKE` clause, use:
$people = ORM::for_table('person')->where_like('Name', '%fred%')->find_many();
+Similarly, to add a `WHERE ... NOT LIKE` clause, use:
+
+ $people = ORM::for_table('person')->where_not_like('Name', '%bob%')->find_many();
+
##### Raw WHERE clauses #####
If you require a more complex query, you can use the `where_raw` method to specify the SQL fragment exactly. This method takes two arguments: the string to add to the query, and an array of parameters which will be bound to the string. The string should contain question marks to represent the values to be bound, and the parameter array should contain the values to be substituted into the string in the correct order.