File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ Doctrine DBAL API integrates native extensions. If you already have an open conn
1515through the ``Doctrine\DBAL\DriverManager::getConnection() `` method you
1616can 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.
3232A 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
113113Named parameters have the advantage that their labels can be re-used and only need to be bound once:
114114
You can’t perform that action at this time.
0 commit comments