Skip to content

Commit 65320a4

Browse files
committed
minor #10759 Update typo inside findAllGreaterThanPrice method in Databases and the Doctrine ORM (svjp)
This PR was submitted for the 4.2 branch but it was merged into the 4.1 branch instead (closes #10759). Discussion ---------- Update typo inside findAllGreaterThanPrice method in Databases and the Doctrine ORM Hello everyone 😄, I realized that the `findAllGreaterThanPrice()` does not use the `$price` parameter that it receives in the method example. Then I thought maybe someone just didn't notice it while writing the docs, why not fix it right? I think it could generate some confusion. Cheers! Commits ------- 16e5b3e Update doctrine.rst
2 parents c38f293 + 16e5b3e commit 65320a4

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)