summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorSimon Holywell <[email protected]>2012-11-07 14:24:02 +0000
committerSimon Holywell <[email protected]>2012-11-07 14:24:02 +0000
commitac450407608d6dcd111c873d964228cd159c53a0 (patch)
tree6b354f7d1aa118cdce2ea8114a8fab5ce08cb22d /README.markdown
parentc956f1c8250cfb07c29f5b14a43e2ca30747e2d6 (diff)
Closes issue #67 Typo in documentation
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown
index 2e6e6b5..a9843f3 100644
--- a/README.markdown
+++ b/README.markdown
@@ -299,7 +299,7 @@ The `join` methods also take an optional third parameter, which is an `alias` fo
If you need to perform more complex queries, you can completely specify the query to execute by using the `raw_query` method. This method takes a string and an array of parameters. The string should contain placeholders, either in question mark or named placeholder syntax, which will be used to bind the parameters to the query.
- $people = ORM::for_table('person')->raw_query('SELECT p.* FROM person p JOIN role r ON p.role_id = r.id WHERE r.name = :role', array('role' => 'janitor')->find_many();
+ $people = ORM::for_table('person')->raw_query('SELECT p.* FROM person p JOIN role r ON p.role_id = r.id WHERE r.name = :role', array('role' => 'janitor'))->find_many();
The ORM class instance(s) returned will contain data for all the columns returned by the query. Note that you still must call `for_table` to bind the instances to a particular table, even though there is nothing to stop you from specifying a completely different table in the query. This is because if you wish to later called `save`, the ORM will need to know which table to update.