Checking If Product Has Combination

Hi. How to check if the product has combination? Which function can I use to check it?

$combinations = db_get_fields("SELECT combination_hash FROM ?:product_options_inventory WHERE product_id=?i", $product_id);

Returns an array of the combinations for that product or an empty array if none.