Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 05-good-practices/databases/prepared-statement-results.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
$sql = 'SELECT id, email FROM users WHERE email = :email';
$statement = $pdo->prepare($sql);
$email = filter_input(INPUT_GET, 'email');
$statement->bindValue(':email', $email, PDO::PARAM_INT);
$statement->bindValue(':email', $email, PDO::PARAM_STR);

// Iterate results one at a time
echo 'One result as a time as associative array', PHP_EOL;
Expand Down