I have a prepared statement that fails and I really cannot find the reason why:
$stmt = $connection->prepare('SELECT password
FROM users
WHERE email=(?)')
$stmt->bind_param('s',$sessionmail);
$stmt->execute();
$stmt->bind_result($password);
$stmt->fetch();
$sessionmail has my mail in it(I cannot disclose it for obvious reasons).
Furthermore the SQL statement above runs OK in the console…with the password being retrieved from the db table.
Do you see anything wrong with the code above?
Nevermind I found what the problem was.