summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorJamie Matthews <[email protected]>2011-01-22 11:22:43 +0000
committerJamie Matthews <[email protected]>2011-01-22 11:22:43 +0000
commit46cad2491c4eadef1c4538b3a0afa9650a6e4c38 (patch)
tree7412aeff74b4d720bdab72cf8a4408104f0d8bbe /README.markdown
parent8b92b3019821f5f619a95a0b58b62e3bb43dd455 (diff)
Add support for GROUP BY - issue #13
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index 305c745..64b5595 100644
--- a/README.markdown
+++ b/README.markdown
@@ -182,6 +182,14 @@ Two methods are provided to add `ORDER BY` clauses to your query. These are `ord
$people = ORM::for_table('person')->order_by_asc('gender')->order_by_desc('name')->find_many();
+#### Grouping ####
+
+*Note that this method **does not** escape it query parameter and so this should **not** by passed directly from user input.*
+
+To add a column to GROUP BY to your query, call the `group_by` method, passing in the column name.
+
+ $poeple = ORM::for_table('person')->where('gender', 'female')->group_by('name')->find_many();
+
#### Result columns ####
By default, all columns in the `SELECT` statement are returned from your query. That is, calling: