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 .= " 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実行 新着店舗情報//MYSQL4はサブクエリが使えないのでテンポラリーテーブルを使用する $sql = "CREATE TEMPORARY TABLE TEMP1 as "; $sql .= "select A.JYANRU_CD,COUNT(A.JYANRU_CD) AS CNT from T_JYANRU AS A "; $sql .= " INNER JOIN T_SHOP AS C ON (A.ID = C.ID)"; $sql .= " INNER JOIN M_KEISAISYA AS G ON C.ID=G.ID"; $sql .= " WHERE "; $sql .= " C.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 .= " GROUP BY A.JYANRU_CD"; $sql .= " ORDER BY A.JYANRU_CD"; db_exec($db,$sql); $sql = "select A.JYANRU_CD,A.JYANRU_NAME,B.CNT from M_JYANRU AS A "; $sql .= " LEFT JOIN TEMP1 AS B ON (A.JYANRU_CD = B.JYANRU_CD)"; $sql .= " ORDER BY A.JYANRU_CD"; $result=db_select($db,$sql); $TEMP_LIST=""; while($result->fetchInto($row, DB_FETCHMODE_ASSOC)) { $array_jyanru[] = mb_convert_encoding( $row['JYANRU_CD'],"SJIS", "EUC-JP,auto"). "\t" . mb_convert_encoding( $row['JYANRU_NAME'],"SJIS", "EUC-JP,auto") . "\t" . mb_convert_encoding( $row['CNT'],"SJIS", "EUC-JP,auto") ; $TEMP_LIST .= mb_convert_encoding( $row['JYANRU_NAME'],"SJIS", "EUC-JP,auto") .","; } $TEMP_LIST = substr($TEMP_LIST,0,strlen($TEMP_LIST)-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); //JOBボード $sql = "select distinct C.JYANRU_CD,D.JYANRU_NAME from T_JOB 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 .= " ORDER BY C.JYANRU_CD"; $result=db_select($db,$sql); $TEMP_LIST3=""; while($result->fetchInto($row, DB_FETCHMODE_ASSOC)) { $array_job[] = mb_convert_encoding( $row['JYANRU_CD'],"SJIS", "EUC-JP,auto"). "\t" . mb_convert_encoding( $row['JYANRU_NAME'],"SJIS", "EUC-JP,auto") ; $TEMP_LIST3 .= mb_convert_encoding( $row['JYANRU_NAME'],"SJIS", "EUC-JP,auto") .","; } $TEMP_LIST3 = substr($TEMP_LIST3,0,strlen($TEMP_LIST3)-1); //クーポンボード $sql = "select distinct C.JYANRU_CD,D.JYANRU_NAME from T_QUPON 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 .= " ORDER BY C.JYANRU_CD"; $result=db_select($db,$sql); $TEMP_LIST3=""; while($result->fetchInto($row, DB_FETCHMODE_ASSOC)) { $array_qupon[] = mb_convert_encoding( $row['JYANRU_CD'],"SJIS", "EUC-JP,auto"). "\t" . mb_convert_encoding( $row['JYANRU_NAME'],"SJIS", "EUC-JP,auto") ; $TEMP_LIST4 .= mb_convert_encoding( $row['JYANRU_NAME'],"SJIS", "EUC-JP,auto") .","; } $TEMP_LIST4 = substr($TEMP_LIST4,0,strlen($TEMP_LIST4)-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?>ナビゲーション
こかナビ
http://kokanavi.oe1.jp/
[更新]
line point 周辺の天気予報はこちら(new!!)
point [占い]青柳妙英先生の九星気学(new!!)
line 0){?> 0){?>
お店検索
point point
line
こかナビ新着ボード
最新情報はこちらから!!
point新着ボードへGO!!
line
こかナビ求人
求人はこちらから!!
pointこかナビ求人へGO!!
line
こかナビクーポン
クーポンはこちらから!!
pointこかナビクーポンへGO!!
line
メールマガジン
新着情報、役立つ情報等を携帯メールにてお届けします。
pointメルマガ登録へGO!!
line
トピックス

line point サイトマップ
point リンク集
point 友達に教える
point お問合わせ
ナビゲーション
『こかナビ』
こかナビはを中心に、などの情報を満載したナビゲーションサイトです。