Skip to content

Commit d395245

Browse files
authored
Merge pull request #6930 from Crell/patch-1
Fix typo in first example
2 parents 3bf33b5 + a78672b commit d395245

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/en/reference/data-retrieval-and-manipulation.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Doctrine DBAL API integrates native extensions. If you already have an open conn
1515
through the ``Doctrine\DBAL\DriverManager::getConnection()`` method you
1616
can start using this API for data retrieval easily.
1717

18-
Start writing an SQL query and pass it to the ``query()`` method of your
19-
connection:
18+
Start writing an SQL query and pass it to the ``executeQuery()`` method
19+
of your connection:
2020

2121
.. code-block:: php
2222
@@ -26,7 +26,7 @@ connection:
2626
$conn = DriverManager::getConnection($params, $config);
2727
2828
$sql = "SELECT * FROM articles";
29-
$stmt = $conn->query($sql); // Simple, but has several drawbacks
29+
$stmt = $conn->executeQuery($sql); // Simple, but has several drawbacks
3030
3131
The query method executes the SQL and returns a database statement object.
3232
A database statement object can be iterated to retrieve all the rows that matched
@@ -104,11 +104,11 @@ position of the variable to bind into the ``bindValue()`` method:
104104
$stmt->bindValue(1, $id);
105105
$stmt->bindValue(2, $status);
106106
$resultSet = $stmt->executeQuery();
107-
107+
108108
.. note::
109109

110110
The numerical parameters in ``bindValue()`` start with the needle
111-
``1``.
111+
``1``.
112112

113113
Named parameters have the advantage that their labels can be re-used and only need to be bound once:
114114

0 commit comments

Comments
 (0)