Fix mysqli_query return value for query without result

I feel like this should be handled inside php_mysql_get_result instead. And it also already tries to handle it there. So if you have to do this I'm guessing there is a bug in php_mysql_get_result that you should fix instead of moving the logic here.