I need some help in getting single string from wpdb instead od array. The below code should return child post number. It will always return array with single element.
global $wpdb;
$store = wp_get_current_user();
$store_id = $store->ID;
$par_order = $reservation->transaction_id;
$sql = "SELECT ID FROM " . $wpdb->prefix . "posts
WHERE post_type = 'shop_order'
AND post_parent = " . $par_order
. " AND post_author = " . $storer_id;
$sub_orders = $wpdb->get_results($sql);
get_varinstead ofget_resultsdeveloper.wordpress.org/reference/classes/wpdb/get_varget_var?