query("SELECT count(*) from short_work_mt where indication_flag='t' AND top_flag='t'"); $count_short_datas = $sql_short_count->fetchAll(PDO::FETCH_ASSOC); $page_all = $count_short_datas[0]["count"]; include __dir__.'/../layout/pagenate.html'; $sql_short = $pdo->query("SELECT short_work_mt.id, short_work_mt.title, short_work_mt.update_date, short_work_mt.index, short_work_ct_rc.title AS icon_title, icon FROM short_work_mt INNER JOIN short_work_ct_rc ON short_work_mt.sub_id=short_work_ct_rc.id WHERE indication_flag='t' AND top_flag='t' ORDER BY update_date DESC LIMIT 8 OFFSET {$current_page}"); $short_datas = $sql_short->fetchAll(PDO::FETCH_ASSOC); // print_r($short_data); for($i = 0; $i < count($short_datas); $i++){ $tmp = substr($short_datas[$i]['update_date'],0,10); $tmp = str_replace("-", '/',$tmp); $short_datas[$i]['update_date'] = $tmp; //print_r($tmp); } ?>

短期のお仕事