Skip to content

Commit

Permalink
Fix Example Code
Browse files Browse the repository at this point in the history
The example executes the function `fetchAllAssociative` on the Statement object but this object doesn't have this function. Instead, the function should be executed on the returned result set.
  • Loading branch information
Sephster authored and derrabus committed Jun 16, 2021
1 parent 2f286f4 commit 3559930
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/en/reference/data-retrieval-and-manipulation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ Prepare a given SQL statement and return the
<?php
$statement = $conn->prepare('SELECT * FROM user');
$statement->execute();
$users = $statement->fetchAllAssociative();
$resultSet = $statement->execute();
$users = $resultSet->fetchAllAssociative();
/*
array(
Expand Down

0 comments on commit 3559930

Please sign in to comment.