File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
user_guide_src/source/database Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -16,20 +16,31 @@ getResult()
16
16
===========
17
17
18
18
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
20
25
loop, like this:
21
26
22
27
.. literalinclude :: results/001.php
23
28
24
29
The above method is an alias of ``getResultObject() ``.
25
30
31
+ Getting an Array of Array
32
+ -------------------------
33
+
26
34
You can pass in the string 'array' if you wish to get your results
27
35
as an array of arrays:
28
36
29
37
.. literalinclude :: results/002.php
30
38
31
39
The above usage is an alias of ``getResultArray() ``.
32
40
41
+ Getting an Array of Custom Object
42
+ ---------------------------------
43
+
33
44
You can also pass a string to ``getResult() `` which represents a class to
34
45
instantiate for each result object
35
46
You can’t perform that action at this time.
0 commit comments