diff --git a/doctrine.rst b/doctrine.rst index ff8eaa2479a..74bbd073373 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -998,8 +998,8 @@ In addition, you can query directly with SQL if you need to:: WHERE p.price > :price ORDER BY p.price ASC '; - $stmt = $conn->prepare($sql); - $resultSet = $stmt->executeQuery(['price' => $price]); + + $resultSet = $conn->executeQuery($sql, ['price' => $price]); // returns an array of arrays (i.e. a raw data set) return $resultSet->fetchAllAssociative();