如何在mysql oop中获取一行

I am making a change password function. Currently It is just changing the password. But I want to amend it a bit. If email and password is valid then it should change the password, otherwise not. This is my code. Can anyone help me?

function CHANGE_PASSWORD($conn, $MSG)
{
    $sql = $conn->prepare("UPDATE users SET password = ? WHERE email = ? AND password=?");
    $sql->bind_param("sss", $newpass, $email, $password);
    $email = $_REQUEST["EMAIL"];
    $pass = $_REQUEST["PASSWORD"];
    $newpass = $_REQUEST["NEW_PASSWORD"];

    if ($sql->execute()) {

        if($sql->affected_rows == 0) {
            $json["STATUS"] = "FAIL";
            $json["MESSAGE"] = "Invalid email / password";
        } else {
            $json["STATUS"] = "SUCCESS";
            $json["MESSAGE"] = "Password Update Successful";
        }               
    } else {
        $json["STATUS"] = "ERROR";
        $json["MESSAGE"] = "Please try again later.";
        $json["ERROR"] = $sql->error_list;
    }

    $sql->close();
    return json_encode($json);
    #function ends
}

My Current URL looks like this

http://localhost/safespaces/server.php?REQUEST=CHANGE_PASSWORD&EMAIL=mr.aleem001%40gmail.com&PASSWORD=haioye&NEW_PASSWORD=12345

To fetch a row, use

$result = $sql->get_result();
$row = $result->fetch_assoc();

I Hope it Helps