summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorSimon Holywell <[email protected]>2012-11-08 13:38:15 +0000
committerSimon Holywell <[email protected]>2012-11-08 13:38:15 +0000
commit6ad8dc19fee4a323e2c5e92371a46be1a1b7c847 (patch)
tree3859ee859e4c7caf247b6e3fb4ebbce60d7abfd8 /README.markdown
parent356ac99b9bb550e15bb0eb083d8a361d81466ef9 (diff)
parentac450407608d6dcd111c873d964228cd159c53a0 (diff)
Merge branch 'master' into develop
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 7c753cc..575e6ce 100644
--- a/README.markdown
+++ b/README.markdown
@@ -310,7 +310,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 optionally an array of parameters. The string can 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.