Skip to content

Commit 81b69ee

Browse files
ghertkowouterj
authored andcommitted
call fetchAllAssociative for a result set
`fetchAllAssociative()` is not available for class "Doctrine\DBAL\Statement"
1 parent 9834707 commit 81b69ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doctrine.rst

Lines 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)