Skip to content

Commit f1767b3

Browse files
committed
docs: make method names linkable
1 parent 0c8437f commit f1767b3

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

user_guide_src/source/database/results.rst

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ There are several ways to generate query results:
1212
Result Arrays
1313
*************
1414

15-
**getResult()**
15+
getResult()
16+
===========
1617

1718
This method returns the query result as an array of **objects**, or
1819
**an empty array** on failure. Typically you'll use this in a foreach
@@ -36,7 +37,8 @@ instantiate for each result object
3637

3738
The above method is an alias of ``getCustomResultObject()``.
3839

39-
**getResultArray()**
40+
getResultArray()
41+
================
4042

4143
This method returns the query result as a pure array, or an empty
4244
array when no result is produced. Typically you'll use this in a foreach
@@ -48,7 +50,8 @@ loop, like this:
4850
Result Rows
4951
***********
5052

51-
**getRow()**
53+
getRow()
54+
========
5255

5356
This method returns a single result row. If your query has more than
5457
one row, it returns only the first row. The result is returned as an
@@ -66,7 +69,8 @@ to instantiate the row with:
6669

6770
.. literalinclude:: results/007.php
6871

69-
**getRowArray()**
72+
getRowArray()
73+
=============
7074

7175
Identical to the above ``row()`` method, except it returns an array.
7276
Example:
@@ -98,7 +102,8 @@ parameter:
98102
(prefetching). Use ``getUnbufferedRow()`` for processing large
99103
result sets.
100104

101-
**getUnbufferedRow()**
105+
getUnbufferedRow()
106+
==================
102107

103108
This method returns a single result row without prefetching the whole
104109
result in memory as ``row()`` does. If your query has more than one row,
@@ -145,7 +150,8 @@ In addition to the two methods listed below, the following methods also can
145150
take a class name to return the results as: ``getFirstRow()``, ``getLastRow()``,
146151
``getNextRow()``, and ``getPreviousRow()``.
147152

148-
**getCustomResultObject()**
153+
getCustomResultObject()
154+
=======================
149155

150156
Returns the entire result set as an array of instances of the class requested.
151157
The only parameter is the name of the class to instantiate.
@@ -154,7 +160,8 @@ Example:
154160

155161
.. literalinclude:: results/014.php
156162

157-
**getCustomRowObject()**
163+
getCustomRowObject()
164+
====================
158165

159166
Returns a single row from your query results. The first parameter is the row
160167
number of the results. The second parameter is the class name to instantiate.
@@ -173,21 +180,24 @@ Example:
173180
Result Helper Methods
174181
*********************
175182

176-
**getFieldCount()**
183+
getFieldCount()
184+
===============
177185

178186
The number of FIELDS (columns) returned by the query. Make sure to call
179187
the method using your query result object:
180188

181189
.. literalinclude:: results/017.php
182190

183-
**getFieldNames()**
191+
getFieldNames()
192+
===============
184193

185194
Returns an array with the names of the FIELDS (columns) returned by the query.
186195
Make sure to call the method using your query result object:
187196

188197
.. literalinclude:: results/018.php
189198

190-
**getNumRows()**
199+
getNumRows()
200+
============
191201

192202
The number of records returned by the query. Make sure to call
193203
the method using your query result object:
@@ -198,7 +208,8 @@ the method using your query result object:
198208
CodeIgniter will fetch and buffer the query result records internally and
199209
return a count of the resulting record array, which can be inefficient.
200210

201-
**freeResult()**
211+
freeResult()
212+
============
202213

203214
It frees the memory associated with the result and deletes the result
204215
resource ID. Normally PHP frees its memory automatically at the end of
@@ -210,7 +221,8 @@ Example:
210221

211222
.. literalinclude:: results/020.php
212223

213-
**dataSeek()**
224+
dataSeek()
225+
==========
214226

215227
This method sets the internal pointer for the next result row to be
216228
fetched. It is only useful in combination with ``getUnbufferedRow()``.

0 commit comments

Comments
 (0)