include "data/db.inc"; $Ym = $_GET["Ym"]; if (empty($Ym)) $Ym = date("Ym"); db_connect ($MYSQL_HOST, $MYSQL_USER, $MYSQL_PASSWORD, $MYSQL_DBNAME); $like_str = $Ym . "%"; $sql = "select * from news " . "where date like \"$like_str\" " . "order by date desc, create_time desc "; $res = mysql_query($sql) or error(__FILE__, __LINE__, "Database Error", "$sql", true); $Y = substr($Ym, 0, 4); $m = substr($Ym, 4, 2); $M = $m; if ($M == "01") $M = "1"; if ($M == "02") $M = "2"; if ($M == "03") $M = "3"; if ($M == "04") $M = "4"; if ($M == "05") $M = "5"; if ($M == "06") $M = "6"; if ($M == "07") $M = "7"; if ($M == "08") $M = "8"; if ($M == "09") $M = "9"; $Ym_str = $Y . "年" . $M . "月の"; ?>
【お問い合わせ】 |
フットサルタイムズトップへ - ニュース |
|
$now_date = "";
while (list($id_, $date_, $title_,
$caption_, $body_, $link_, $target_, $url_,
$create_time_, $update_time_) = mysql_fetch_row($res)) {
if ($now_date != $date_) {
$date_Y = substr($date_, 0, 4);
$date_m = substr($date_, 4, 2);
$date_d = substr($date_, 6, 2);
$date_str = "$date_Y/$date_m/$date_d";
if ($now_date != "") echo "
\n"; echo "$date_str \n"; $now_date = $date_; } $title_ = addslashes($title_); echo " \n"; } ?> |