スポンサードリンク

MySQL データテーブルにテキストファイルでインポートする/PHP, MySQL & Google Maps

◆テキストファイルに次のように記載。(注意:UTF-8で保存しましょう)

1;35.714559;139.517698;kouen;小金井公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-koganei.html” target=”_blank”>詳細リンク</a>;
2;35.763940;139.384980;kouen;野山北・六道山公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-noyamakita.html” target=”_blank”>詳細リンク</a>;
3;35.676495;139.491963;kouen;府中の森公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-fuchumori.html” target=”_blank”>詳細リンク</a>;
4;35.656227;139.473656;kouen;府中市郷土の森;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-fuchuukyoudounomori.html” target=”_blank”>詳細リンク</a>;
5;35.63740;139.46047;kouen;都立桜ヶ丘公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-sakuragaoka.html” target=”_blank”>詳細リンク</a>;自然公園、都内で森林散策ができる。
6;35.682294;139.524779;kouen;都立野川公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-nogawa.html” target=”_blank”>詳細リンク</a>;自然公園、遊具は少ないが、自然がいっぱい。バーベキューも。
7;35.699826;139.572845;kouen;井の頭公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-inogashira.html” target=”_blank”>詳細リンク</a>;自然公園・動物園 吉祥寺駅近くの有名公園
8;35.531563;139.388716;kouen;相模原公園;<a href=”http://waotabi.web.fc2.com/kouen/kanagawa-sagamihara.html” target=”_blank”>詳細リンク</a>;
9;35.527494;139.391903;kouen;相模原麻溝公園;<a href=”http://waotabi.web.fc2.com/kouen/kanagawa-sagamihara.html” target=”_blank”>詳細リンク</a>;
10;35.629049;139.621368;kouen;都立砧公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-kinuta.html” target=”_blank”>詳細リンク</a>;12種と少なめですが遊具アスレチック広場 があります。
11;35.714497;139.773688;kouen;上野恩賜公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-ueno.html” target=”_blank”>詳細リンク</a>;
12;35.760191;140.061629;kouen;船橋アンデルセン公園;<a href=”http://waotabi.web.fc2.com/kouen/chiba-anderusen.html” target=”_blank”>詳細リンク</a>;有料テーマパーク型公園。アスレチックと大型遊具が大変充実。多数滑り台も有り
13;35.517487;140.280433;kouen;昭和の森公園;<a href=”http://waotabi.web.fc2.com/chiba-showa.html” target=”_blank”>詳細リンク</a>;
14;35.960831;139.850614;kouen;清水公園;<a href=”http://waotabi.web.fc2.com/chiba-shimizu.html” target=”_blank”>詳細リンク</a>;ここはアスレチックが有名。100基以上

1;35.714559;139.517698;kouen;小金井公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-koganei.html” target=”_blank”>詳細リンク</a>;2;35.763940;139.384980;kouen;野山北・六道山公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-noyamakita.html” target=”_blank”>詳細リンク</a>;3;35.676495;139.491963;kouen;府中の森公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-fuchumori.html” target=”_blank”>詳細リンク</a>;4;35.656227;139.473656;kouen;府中市郷土の森;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-fuchuukyoudounomori.html” target=”_blank”>詳細リンク</a>;5;35.63740;139.46047;kouen;都立桜ヶ丘公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-sakuragaoka.html” target=”_blank”>詳細リンク</a>;自然公園、都内で森林散策ができる。6;35.682294;139.524779;kouen;都立野川公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-nogawa.html” target=”_blank”>詳細リンク</a>;自然公園、遊具は少ないが、自然がいっぱい。バーベキューも。7;35.699826;139.572845;kouen;井の頭公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-inogashira.html” target=”_blank”>詳細リンク</a>;自然公園・動物園 吉祥寺駅近くの有名公園8;35.531563;139.388716;kouen;相模原公園;<a href=”http://waotabi.web.fc2.com/kouen/kanagawa-sagamihara.html” target=”_blank”>詳細リンク</a>;9;35.527494;139.391903;kouen;相模原麻溝公園;<a href=”http://waotabi.web.fc2.com/kouen/kanagawa-sagamihara.html” target=”_blank”>詳細リンク</a>;10;35.629049;139.621368;kouen;都立砧公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-kinuta.html” target=”_blank”>詳細リンク</a>;12種と少なめですが遊具アスレチック広場 があります。11;35.714497;139.773688;kouen;上野恩賜公園;<a href=”http://waotabi.web.fc2.com/kouen/tokyo-ueno.html” target=”_blank”>詳細リンク</a>;12;35.760191;140.061629;kouen;船橋アンデルセン公園;<a href=”http://waotabi.web.fc2.com/kouen/chiba-anderusen.html” target=”_blank”>詳細リンク</a>;有料テーマパーク型公園。アスレチックと大型遊具が大変充実。多数滑り台も有り13;35.517487;140.280433;kouen;昭和の森公園;<a href=”http://waotabi.web.fc2.com/chiba-showa.html” target=”_blank”>詳細リンク</a>;14;35.960831;139.850614;kouen;清水公園;<a href=”http://waotabi.web.fc2.com/chiba-shimizu.html” target=”_blank”>詳細リンク</a>;ここはアスレチックが有名。100基以上

◆インポートすると次のようになる。

これで取り急ぎデータベース側は完成!

次は、このデータをphpでXMLを生成して、HTMLへ渡すことになるが、良くわからないので、Google さんに教えて頂きましょう。

つづく

スポンサードリンク

Related Posts

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <img localsrc="" alt="">