I am working on a login and register android project. I tried different solutions for this PHP error, but none of them helped me.
I'm getting this error:
Call to undefined method mysqli_stmt::get_result() in ... on line 59
And line 59 is: $user = $stmt->get_result()->fetch_assoc();
I read that if I don't have drivers I should use bind & fetch instead, but I couldn't figure out how.
My function:
public function getUserByEmailAndPassword($email, $password) {
$stmt = $this->conn->prepare("SELECT * FROM seemidavajaon WHERE email = ?");
$stmt->bind_param("s", $email);
if ($stmt->execute()) {
$user = $stmt->get_result()->fetch_assoc();
$stmt->close();
return $user;
} else {
return NULL;
}
}