File tree Expand file tree Collapse file tree
user_guide_src/source/database Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,20 +16,31 @@ getResult()
1616===========
1717
1818This method returns the query result as an array of **objects **, or
19- **an empty array ** on failure. Typically you'll use this in a foreach
19+ **an empty array ** on failure.
20+
21+ Getting an Array of stdClass
22+ ----------------------------
23+
24+ Typically you'll use this in a foreach
2025loop, like this:
2126
2227.. literalinclude :: results/001.php
2328
2429The above method is an alias of ``getResultObject() ``.
2530
31+ Getting an Array of Array
32+ -------------------------
33+
2634You can pass in the string 'array' if you wish to get your results
2735as an array of arrays:
2836
2937.. literalinclude :: results/002.php
3038
3139The above usage is an alias of ``getResultArray() ``.
3240
41+ Getting an Array of Custom Object
42+ ---------------------------------
43+
3344You can also pass a string to ``getResult() `` which represents a class to
3445instantiate for each result object
3546
You can’t perform that action at this time.
0 commit comments