summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorSander Marechal <[email protected]>2011-03-02 15:57:19 +0100
committerSander Marechal <[email protected]>2011-03-02 15:57:19 +0100
commitf9af1ffce3b01e6e87ded22cc5903c0bf253fbc1 (patch)
treee52ded013cf39a9a5003241a5cb4129b121bddf1 /README.markdown
parentc956f1c8250cfb07c29f5b14a43e2ca30747e2d6 (diff)
Allow raw queries without parameters
This is useful for e.g. MySQL `LOCK TABLE` or SQLite `VACUUM` commands which usually do not require parameters.
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..74ff2f0 100644
--- a/README.markdown
+++ b/README.markdown
@@ -297,7 +297,7 @@ The `join` methods also take an optional third parameter, which is an `alias` fo
#### Raw queries ####
-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.
+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();