I have two subsequent mysqli statements, and the second returns:
Fatal error: Call to a member function bind_param() on a non-object in ...
Something might have gone wrong with $db->prepare(), check $db->error.
$db->prepare()
$db->error