Question: You want to use wildcard characters when searching for records in a MySQL/MariaDB database using a PDO prepared statement. Which code should you use?
- `$statement->bindValue(':name', '%' . $_GET['name'] . '%');`
- `$statement->bindValue('%' . $_GET['name'] . '%', ':name');`
- `$statement->bindParam(':name', '%' . $_GET['name'] . '%');`
- `$statement->bindParam('%' . $_GET['name'] . '%', ':name');`
Answer: The correct answer of the above question is Option A:`$statement->bindValue(':name', '%' . $_GET['name'] . '%');`