Read the documentation on
get_result[
^]. It returns a mysqli_result object, not an integer. Now go off and read the documentation on
mysqli_result[
^]. That mysqli_result object ends up in your $result1 variable, which you then pass to something else that is not expecting a mysqli_result object, but an integer.
That's why you're getting the error.