Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6cfce6a

Browse filesBrowse files
committed
bug #16431 call fetchAllAssociative for a result set not a statement (ghertko)
This PR was submitted for the 6.0 branch but it was merged into the 4.4 branch instead. Discussion ---------- call `fetchAllAssociative` for a result set not a statement `fetchAllAssociative()` is not available for class "Doctrine\DBAL\Statement" <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- 81b69ee call `fetchAllAssociative` for a result set
2 parents 9834707 + 81b69ee commit 6cfce6a
Copy full SHA for 6cfce6a

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎doctrine.rst

Copy file name to clipboardExpand all lines: doctrine.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,10 +853,10 @@ In addition, you can query directly with SQL if you need to::
853853
ORDER BY p.price ASC
854854
';
855855
$stmt = $conn->prepare($sql);
856-
$stmt->execute(['price' => $price]);
856+
$resultSet = $stmt->executeQuery(['price' => $price]);
857857

858858
// returns an array of arrays (i.e. a raw data set)
859-
return $stmt->fetchAllAssociative();
859+
return $resultSet->fetchAllAssociative();
860860
}
861861
}
862862

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.