Skip to content

Commit 16e5b3e

Browse files
João Paulo Vieira da Silvaxabbuh
authored andcommitted
Update doctrine.rst
1 parent c38f293 commit 16e5b3e

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
@@ -675,7 +675,7 @@ In addition to the query builder, you can also query with `Doctrine Query Langua
675675
FROM App\Entity\Product p
676676
WHERE p.price > :price
677677
ORDER BY p.price ASC'
678-
)->setParameter('price', 1000);
678+
)->setParameter('price', $price);
679679

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

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

0 commit comments

Comments
 (0)