You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/db-layer.md
+24-7
Original file line number
Diff line number
Diff line change
@@ -1136,14 +1136,21 @@ foreach ($invoices as $invoice) {
1136
1136
$invoice = $connection->fetchOne($sql);
1137
1137
```
1138
1138
1139
-
By default, these calls create arrays with both associative and numeric indexes. You can change this behavior by using `Phalcon\Db\Result::setFetchMode()`. This method receives a constant, defining which kind of index is required.
1139
+
By default, these calls create arrays with both associative and numeric indexes. For methods like
1140
+
`fetchArray()`, `fetch()` and `dataSeek()` you can change this behavior by using `Phalcon\Db\Result::setFetchMode()`. For methods like `fetchAll()` or `fetchOne()` you can use the `$fetchMode` argument.
The `query()` method returns an instance of [Phalcon\Db\Result\Pdo][db-result-pdo]. These objects encapsulate all the functionality related to the returned resultset i.e. traversing, seeking specific records, count etc.
0 commit comments