お知らせ

お知らせ一覧
query($sql); // 実行 //echo("sql= ".$sql."
"); while($data = $stmt->fetch(PDO::FETCH_BOTH)){ // データ取得 //データ セット $id = $data['id']; $category_id = $data['category_id']; $date1 = substr($data['disp_date'],0,4); $date2 = substr($data['disp_date'],5,2); $date3 = substr($data['disp_date'],8,2); $title = str_replace("<red>", "<span class=\"tyui\">", $data['title']); $title = str_replace("</red>", "</span>", $title); $news_category_id = $data['category_id']; $text1 = $data['text1']; $link1 = $data['link1']; if($data['new_flg']) { $new_flg_text = "New!"; }else{ $new_flg_text = NULL; } //カテゴリー名 $sql = "select * from category"; $sql.= " where category_del_flg != 1"; $sql.= " and category_id = '".$category_id."'"; $stmt_category = $dbh->query($sql); // 実行 $data_category = $stmt_category->fetch(PDO::FETCH_BOTH); ?>