function renew_NumOfNewBookings($id_of_new_bookings, $is_new = '0', $user_id = 1)
{
    global $wpdb;
    if (count($id_of_new_bookings) > 0) {
        if (is_field_in_table_exists('booking', 'is_new') == 0) {
            return 0;
        }
        // do not created this field, so return 0
        $id_of_new_bookings = implode(',', $id_of_new_bookings);
        $id_of_new_bookings = wpbc_clean_string_for_db($id_of_new_bookings);
        //debuge($id_of_new_bookings);
        if ($id_of_new_bookings == 'all') {
            $update_sql = "UPDATE {$wpdb->prefix}booking AS bk SET bk.is_new = {$is_new} ";
            //debuge($update_sql);
            $update_sql = apply_bk_filter('update_sql_for_checking_new_bookings', $update_sql, 0, $user_id);
        } else {
            $update_sql = "UPDATE {$wpdb->prefix}booking AS bk SET bk.is_new = {$is_new} WHERE bk.booking_id IN  ( {$id_of_new_bookings} ) ";
        }
        if (false === $wpdb->query($update_sql)) {
            bk_error('Error during updating status of bookings at DB', __FILE__, __LINE__);
            die;
        }
    }
}
function renew_NumOfNewBookings($id_of_new_bookings, $is_new = '0')
{
    if (count($id_of_new_bookings) > 0) {
        if (is_field_in_table_exists('booking', 'is_new') == 0) {
            return 0;
        }
        // do not created this field, so return 0
        $id_of_new_bookings = implode(',', $id_of_new_bookings);
        global $wpdb;
        $update_sql = "UPDATE " . $wpdb->prefix . "booking AS bk SET bk.is_new = " . $is_new . " WHERE bk.booking_id IN  ( " . $id_of_new_bookings . " ) ";
        if (false === $wpdb->query($wpdb->prepare($update_sql))) {
            bk_error('Error during updating status of bookings at DB', __FILE__, __LINE__);
            die;
        }
    }
}