This question already has an answer here:
I am changing all my scripts to prepared statements with mysqli and I have a problem. I get this error when I use get_result()
and I don't know why. My php version is 5.3.
Here is the code I use:
$user=$_GET['user'];
$stmt = $dbc->prepare("select * from `users` where id= ? and stare!=1");
$stmt->bind_param('s', $user);
$stmt->execute();
$result = $stmt->get_result();
if ($row = $result->fetch_assoc()) {
//do something
}
Error:
Call to undefined method mysqli_stmt::get_result() in /home/websoft/public_html/twingoo/engine/app/profil_edit.php on line 13
</div>