numRows()>0) { $result->fetchInto($row, DB_FETCHMODE_ASSOC); $PREF_NAME = mb_convert_encoding( $row['PREF_NAME'],"SJIS", "EUC-JP,auto") ; } //SQL実行//マスタデータは常にSELECT $sql = "select distinct I.CITY_NAME from T_JYANRU AS A "; $sql .= " INNER JOIN T_SHOP AS B ON (A.ID = B.ID)"; $sql .= " LEFT JOIN M_JYANRU_S AS C ON (A.JYANRU_CD =C.JYANRU_CD AND A.JYANRU_S_CD =C.JYANRU_S_CD )"; $sql .= " INNER JOIN M_KEISAISYA AS G ON B.ID=G.ID"; $sql .= " INNER JOIN M_PREF AS H ON B.PREF_CD=H.PREF_CD"; $sql .= " INNER JOIN M_CITY AS I ON B.PREF_CD=I.PREF_CD AND B.CITY_CD=I.CITY_CD"; $sql .= " WHERE "; $sql .= " B.PREF_CD = " . $PREF_CD; //掲載期限 $sql .= " AND date_format(now(),'%Y-%m-%d') BETWEEN date_format(G.START_DATE,'%Y-%m-%d') AND date_format(G.END_DATE,'%Y-%m-%d')"; $sql .= " AND (G.DEL_FLG<>'1' OR G.DEL_FLG IS NULL)"; $sql .= " AND G.FLG<>'9'"; $sql .= " AND G.FLG<>'8'"; $sql .= " ORDER BY B.CITY_CD"; $result=db_select($db,$sql); while($result->fetchInto($row, DB_FETCHMODE_ASSOC)) { $CITY_NAME .= mb_convert_encoding( $row['CITY_NAME'],"SJIS", "EUC-JP,auto") .","; } $CITY_NAME = substr($CITY_NAME,0,strlen($CITY_NAME)-1); //新着ボード $sql = "select distinct C.JYANRU_CD,D.JYANRU_NAME from T_KIJI AS A "; $sql .= " INNER JOIN T_SHOP AS B ON (A.ID = B.ID)"; $sql .= " INNER JOIN T_JYANRU AS C ON A.ID=C.ID"; $sql .= " LEFT JOIN M_JYANRU AS D ON C.JYANRU_CD =D.JYANRU_CD"; $sql .= " INNER JOIN M_KEISAISYA AS G ON B.ID=G.ID"; $sql .= " INNER JOIN M_PREF AS H ON B.PREF_CD=H.PREF_CD"; $sql .= " INNER JOIN M_CITY AS I ON B.PREF_CD=I.PREF_CD AND B.CITY_CD=I.CITY_CD"; $sql .= " WHERE "; $sql .= " B.PREF_CD = " . $PREF_CD; //掲載期限 $sql .= " AND date_format(now(),'%Y-%m-%d') BETWEEN date_format(G.START_DATE,'%Y-%m-%d') AND date_format(G.END_DATE,'%Y-%m-%d')"; $sql .= " AND (G.DEL_FLG<>'1' OR G.DEL_FLG IS NULL)"; $sql .= " AND G.FLG<>'9'"; $sql .= " AND G.FLG<>'8'"; $sql .= " ORDER BY C.JYANRU_CD"; $result=db_select($db,$sql); $TEMP_LIST2=""; while($result->fetchInto($row, DB_FETCHMODE_ASSOC)) { $array_new[] = mb_convert_encoding( $row['JYANRU_CD'],"SJIS", "EUC-JP,auto"). "\t" . mb_convert_encoding( $row['JYANRU_NAME'],"SJIS", "EUC-JP,auto") ; $TEMP_LIST2 .= mb_convert_encoding( $row['JYANRU_NAME'],"SJIS", "EUC-JP,auto") .","; } $TEMP_LIST2 = substr($TEMP_LIST2,0,strlen($TEMP_LIST2)-1); //こかナビ新着ボード $sql = "select distinct A.*,B.SHOP_NAME from T_KIJI AS A "; $sql .= " INNER JOIN T_SHOP AS B ON (A.ID = B.ID)"; $sql .= " INNER JOIN T_JYANRU AS C ON A.ID=C.ID"; $sql .= " LEFT JOIN M_JYANRU AS D ON C.JYANRU_CD =D.JYANRU_CD"; $sql .= " INNER JOIN M_KEISAISYA AS G ON B.ID=G.ID"; $sql .= " INNER JOIN M_PREF AS H ON B.PREF_CD=H.PREF_CD"; $sql .= " INNER JOIN M_CITY AS I ON B.PREF_CD=I.PREF_CD AND B.CITY_CD=I.CITY_CD"; $sql .= " WHERE "; $sql .= " B.PREF_CD = " . $PREF_CD; //掲載期限 $sql .= " AND date_format(now(),'%Y-%m-%d') BETWEEN date_format(G.START_DATE,'%Y-%m-%d') AND date_format(G.END_DATE,'%Y-%m-%d')"; $sql .= " AND (G.DEL_FLG<>'1' OR G.DEL_FLG IS NULL)"; $sql .= " AND G.FLG<>'9'"; $sql .= " AND G.FLG<>'8'"; $sql .= " ORDER BY A.KIJI_DATE DESC ,A.UPDATE_DATE DESC"; $sql .= " LIMIT 10"; $result=db_select($db,$sql); while($result->fetchInto($row, DB_FETCHMODE_ASSOC)) { $array_topic[] = mb_convert_encoding( $row['ID'],"SJIS", "EUC-JP,auto"). "\t" . mb_convert_encoding( $row['SEQ'],"SJIS", "EUC-JP,auto"). "\t" . mb_convert_encoding( $row['SHOP_NAME'],"SJIS", "EUC-JP,auto"). "\t" . mb_convert_encoding( $row['KIJI_DATE'],"SJIS", "EUC-JP,auto"). "\t" . mb_convert_encoding( $row['KIJI_TITLE'],"SJIS", "EUC-JP,auto"). "\t" . mb_convert_encoding( $row['KIJI_IMAGE'],"SJIS", "EUC-JP,auto"). "\t" . mb_convert_encoding( $row['KIJI_COMMENT'],"SJIS", "EUC-JP,auto") ; } db_disconnect($db,$result); ?> "; ?> こかナビ新着ボード | <?=$PREF_NAME?><?=$CITY_NAME?><?=$TEMP_LIST2?>
こかナビ
pointこかナビ新着ボード
pointボード
line
トピックス
point
 ()
line point サイトマップ
point 友達に教える
point ホームへ戻る
情報ポータル
『こかナビ』