Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ In addition to the query builder, you can also query with `Doctrine Query Langua
FROM App\Entity\Product p
WHERE p.price > :price
ORDER BY p.price ASC'
)->setParameter('price', 1000);
)->setParameter('price', $price);

// returns an array of Product objects
return $query->execute();
Expand All @@ -696,7 +696,7 @@ Or directly with SQL if you need to::
ORDER BY p.price ASC
';
$stmt = $conn->prepare($sql);
$stmt->execute(['price' => 1000]);
$stmt->execute(['price' => $price]);

// returns an array of arrays (i.e. a raw data set)
return $stmt->fetchAll();
Expand Down