@@ -6,7 +6,7 @@ There are several ways to generate query results:
66
77.. contents ::
88 :local:
9- :depth: 2
9+ :depth: 3
1010
1111*************
1212Result Arrays
@@ -16,26 +16,37 @@ 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
24- The above method is an alias of ``getResultObject() ``.
29+ The above method is an alias of :php:meth: `CodeIgniter\\ Database\\ BaseResult::getResultObject() `.
30+
31+ Getting an Array of Array
32+ -------------------------
2533
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
31- The above usage is an alias of ``getResultArray() ``.
39+ The above usage is an alias of `getResultArray() `_.
40+
41+ Getting an Array of Custom Object
42+ ---------------------------------
3243
3344You can also pass a string to ``getResult() `` which represents a class to
3445instantiate for each result object
3546
3647.. literalinclude :: results/003.php
3748
38- The above method is an alias of `` getCustomResultObject() `` .
49+ The above method is an alias of `getCustomResultObject() `_ .
3950
4051getResultArray()
4152================
@@ -272,7 +283,7 @@ Class Reference
272283 Returns the query results as an array of rows, where each
273284 row is an object of type ``stdClass ``.
274285
275- Usage: see `Result Arrays `_.
286+ Usage: see `Getting an Array of stdClass `_.
276287
277288 .. php :method :: getCustomResultObject($class_name)
278289
0 commit comments