这个mysql_result语句的mysqli等价物是什么?

This is the code I was using with mysql and now I am trying to convert all of my functions over to mysqli. How would I format this so that it returns the values I need?

return (mysql_result($query, 0) == 1) ? true : false;

mysqli has a main function "query" If it's CRUD SQL it will return 1 or 0 (success or not) if it's select SQL it will return the result

$sqli = new mysqli(DB_SERVER,
                            DB_USERNAME,
                            DB_PASSWORD,
                            DB_NAME);
$result = $sqli->query("INSERT INTO...");
return ($result == 1) ? true : false;

I would just use return ($mysqli->query($query) == 1) but that is just me, i believe you can then checke returned value for a boolean