My code looks like this
$eventname = "music festival 5";
$stmt = $pdo->prepare('SELECT * FROM events WHERE eventname=?');
$stmt->execute([$eventname]);
$row = $stmt->fetchAll();
The above gives no result. When I change the following line, it works:-
$stmt = $pdo->prepare('SELECT * FROM events WHERE eventname="music festival 5"');
What could be the issue? Please suggest. Thank you.