get('KI', 'GET,POST', 0 )); $block = 'k'; // 期が未指定の場合、最新のものを取得する if($ki == 0) $ki = $DB->find('select max("KI") as mki from "'.$kisen_name.'_tr" where "KOKAIDATE"<=current_timestamp;', null, 'mki'); // データを取得する $val = $DB->all('select * from "'.$kisen_name.'_kekka" where "KI"=? and trim("BLOCK") ~* ? order by "KAI","HOUEIDATE";', array($ki, $block)); // 期一覧を取得する $val_ki_list = $DB->all('select DISTINCT "KI" from "'.$kisen_name.'_tr" where "KOKAIDATE"<=current_timestamp order by "KI" DESC;'); ob_start(); ?>