I'm very new to PHP and MySQL, and I'm having trouble performing a prepared statement.
This query returns data exactly as I expect it to:
$result = $con->query('SELECT * FROM users WHERE email="' . $user->user_email . '" LIMIT 1');
However, when forming the query into a prepared statement,
$stmt = $con->prepare('SELECT * FROM users WHERE email=? LIMIT 1');
$stmt->bind_param('s', $user->user_email);
$result = $stmt->execute();
I get no results every time. Is there something wrong with the way I'm preparing the statement?