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