diff --git a/exercises/intro_to_queries/IntroQueriesModule.php b/exercises/intro_to_queries/IntroQueriesModule.php index ffbf04e..d99897c 100755 --- a/exercises/intro_to_queries/IntroQueriesModule.php +++ b/exercises/intro_to_queries/IntroQueriesModule.php @@ -52,7 +52,7 @@ public function gatherUsers() { } public function alterUsers($users, $new_value) { - $users = implode('", "', $users); + $usernames_data = implode('", "', $users); // FIXME: write and run the SQL command, log what was done return $result; diff --git a/guide.md b/guide.md index a4fdd31..2206bad 100644 --- a/guide.md +++ b/guide.md @@ -317,7 +317,7 @@ Read the [Method Documentation](methods/README.md). Search for the `query` funct $sql = 'SELECT username FROM redcap_user_information'; - $result = $this->query($sql); + $result = $this->query($sql, []); /* stop writing here */ // parse the mysqli response object into an array @@ -329,7 +329,7 @@ Read the [Method Documentation](methods/README.md). Search for the `query` funct } function alterUsers($users, $new_value) { - $users = implode('", "', $users); + $usernames_data = implode('", "', $users); // FIXME: write and run the SQL command, log what was done $questionMarks = []; @@ -341,7 +341,7 @@ Read the [Method Documentation](methods/README.md). Search for the `query` funct SET allow_create_db = ? WHERE username IN (' . implode(',', $questionMarks) . ')'; - $result = $this->query($sql, [$new_value, $users]); + $result = $this->query($sql, [$new_value, $usernames_data]); if ($result) { // Log what was done if successful