Skip to content

Commit 006a340

Browse files
Crellgreg0ire
authored andcommitted
Address Connection::query() deprecation
query() was long ago deprecated in favor of executeQuery().
1 parent 3bf33b5 commit 006a340

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 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

0 commit comments

Comments
 (0)