From bf93786796d54a735e5da5ac3efe4bd3c8f49dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Vieira=20da=20Silva?= Date: Sat, 8 Dec 2018 20:24:18 +0400 Subject: [PATCH] Update doctrine.rst --- doctrine.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doctrine.rst b/doctrine.rst index 59575958ec3..0283fb9dfbd 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -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(); @@ -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();