From ac450407608d6dcd111c873d964228cd159c53a0 Mon Sep 17 00:00:00 2001 From: Simon Holywell Date: Wed, 7 Nov 2012 14:24:02 +0000 Subject: Closes issue #67 Typo in documentation --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.markdown') 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. -- cgit v1.2.3