static function get_section_ar_list($seating_chart_id) { global $wpdb; $sections = array(); $transient = seating_chart::get_section_list_transient($seating_chart_id); if (false === ($sections = get_transient($transient))) { //$sections = $wpdb->get_results("select distinct section from " . EVENTS_SEATING_CHART_SEAT_TABLE . " where seating_chart_id = $seating_chart_id and level = '$level' order by section "); $sections = array(); $levels = seating_chart::get_level_list($seating_chart_id); if (is_array($levels) && count($levels) > 0) { foreach ($levels as $level) { $rs = $wpdb->get_results("select distinct section from " . EVENTS_SEATING_CHART_SEAT_TABLE . " where seating_chart_id = {$seating_chart_id} and level = '{$level->level}' order by level"); $sections[$level->level] = $rs; } } set_transient($transient, $sections, 60 * 60 * 24 * 365); } return $sections; }