Skip to content

Commit 3201a02

Browse files
committed
docs: add sub section titles
1 parent b89a97f commit 3201a02

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

user_guide_src/source/database/results.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,31 @@ getResult()
1616
===========
1717

1818
This 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
2025
loop, like this:
2126

2227
.. literalinclude:: results/001.php
2328

2429
The above method is an alias of ``getResultObject()``.
2530

31+
Getting an Array of Array
32+
-------------------------
33+
2634
You can pass in the string 'array' if you wish to get your results
2735
as an array of arrays:
2836

2937
.. literalinclude:: results/002.php
3038

3139
The above usage is an alias of ``getResultArray()``.
3240

41+
Getting an Array of Custom Object
42+
---------------------------------
43+
3344
You can also pass a string to ``getResult()`` which represents a class to
3445
instantiate for each result object
3546

0 commit comments

Comments
 (0)