diff options
author | Simon Holywell <[email protected]> | 2012-11-12 15:42:22 +0000 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2012-11-12 15:42:22 +0000 |
commit | 3c082ca31f092f37a58d3412aa5fb07fa32a19f9 (patch) | |
tree | 4068f07be9a1f425bd1fe74ef7e0e76bc1bbe4d7 /README.markdown | |
parent | 3208bcaf9dec89de3128ecf5794a6d637ffbbd25 (diff) |
Issue #17 Add find_array method
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown index d5f10fe..01e7bd2 100644 --- a/README.markdown +++ b/README.markdown @@ -40,6 +40,7 @@ Changelog * Prevent ambiguous column names when joining tables - issue #66 [[hellogerard](https://github.com/hellogerard)] * Add `delete_many` method [[CBeerta](https://github.com/CBeerta)] * Allow unsetting of ORM parameters [[CBeerta](https://github.com/CBeerta)] +* Add `find_array` to get the records as associative arrays [[Surt](https://github.com/Surt)] - closes issue #17 #### 1.1.1 - release 2011-01-30 @@ -129,6 +130,14 @@ To find all records where the `gender` is `female`: $females = ORM::for_table('person')->where('gender', 'female')->find_many(); +##### As an associative array ##### + +You can also find many records as an associative array instead of Idiorm instances. To do this substitute any call to `find_many()` with `find_array()`. + + $females = ORM::for_table('person')->where('gender', 'female')->find_array(); + +This is useful if you need to serialise the the query output into a format like JSON and you do not need the ability to update the returned records. + #### Counting results #### To return a count of the number of rows that would be returned by a query, call the `count()` method. |