From 1159c2d18be62e380ddc05488986d7ed5d45c85c Mon Sep 17 00:00:00 2001 From: Mimoun EL-LEBBAR Date: Mon, 16 Feb 2026 16:34:28 -0500 Subject: [PATCH 1/2] fix variable names of the proposed solution --- exercises/intro_to_queries/IntroQueriesModule.php | 2 +- guide.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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..469f72d 100644 --- a/guide.md +++ b/guide.md @@ -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 From 1accb3446c92b8f95a51dfd9321993d0d373339d Mon Sep 17 00:00:00 2001 From: mimoun-ellebbar Date: Tue, 17 Feb 2026 15:14:36 -0500 Subject: [PATCH 2/2] Apply suggestion from @ChemiKyle Co-authored-by: Kyle Chesney --- guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide.md b/guide.md index 469f72d..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