【phpmyadmin】データベース文字化け(DreamWeaver)

DreamWeaver

を使ってデータベースにつないだり、データベース接続初心者のみなさん
調子どうですか!?

よくphpmyadminで見ると

文字化け

してるような状況に出くわすことがある人!
そんな人は、文字コードという、不可解な問題に対して十分な知識をつけることが必要でしょう!

ま、そんなのもめんどくさい輩たちでしょうから、取り急ぎ下記のように設定してみてくださいな。

これは、phpmyadminがUTF8で構成されているが、S-JISでデータベース登録がされたことが原因

下記の構文をデータベース接続インスタンスに埋め込んでやることがポイント。

[php]
mysql_query("SET NAMES UTF8");
[/php]

phpmyadmin文字化け画面

DreamWeaverで作成した場合

Connectionsフォルダ

の下に作成されているファイルの中に書き込む感じです。

[php]
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_localhost = "localhost";
$database_localhost = "データベース名";
$username_localhost = "ユーザ名";
$password_localhost = "パスワード";
$localhost = mysql_pconnect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_query("SET NAMES UTF8");
?>
[/php]

こんな感じですね。

カテゴリー: IDE、開発ツール, MYSQL, php タグ: , , , ,
【phpmyadmin】データベース文字化け(DreamWeaver)” への1件のコメント
  1. Hey! I’m at work surfing about your blog from my new apple iphone! Just wanted to say I really like reading by way of your weblog and look forward to all your posts! Keep up the outstanding work!

  2. F*ckin? tremendous things here. I am very satisfied to see your post. Thank you so much and i’m taking a appear forward to contact you. Will you please drop me a mail?

  3. Custom Rugs より:

    Create the rug of your dreams by sending us a swatch of fabric, wallpaper, paint color and let our experts create your design,For business, military, schools, churches or any home and especially for that special gift.

  4. constantly i used to read smaller articles or reviews that as well clear their motive, and that is also happening with this post which I am reading here.|

  5. waxing sydney より:

    If you’re still on the fence: grab your favorite earphones, head down to a Best Buy and ask to plug them into a Zune then an iPod and see which one sounds better to you, and which interface makes you smile more. Then you’ll know which is right for you.

  6. Sorry for the huge review, but I’m really loving the new Zune, and hope this, as well as the excellent reviews some other people have written, will help you decide if it’s the right choice for you.

  7. home insurance より:

    hey there and thank you for your details – I’ve certainly picked up anything new from proper here. I did even so expertise several technical points making use of this website, as I experienced to reload the site many times previous to I could get it to load appropriately. I had been wondering if your hosting is OK? Not that I am complaining, but slow loading instances times will sometimes affect your placement in google and could damage your quality score if ads and marketing with Adwords. Anyway I’m adding this RSS to my email and can appear out for a lot a lot more of your respective intriguing content material. Ensure that you update this once more quite soon..

  8. Howdy, i read your blog occasionally and i own a similar 1 and i was just curious should you get plenty of spam feedback? If so how do you protect against it, any plugin or anything you’ll be able to suggest? I get so significantly lately it’s driving me mad so any support is very considerably appreciated.

  9. Transmitir cultura es uno de las apuestas que Signo Editores se puso como meta cuando se fundó la empresa. A lo largo de los años, y con varias décadas vendiendo libros de máxima calidad, la compañía se ha convertido en un referente nacional, con delegaciones repartidas por toda España

  10. metatron より:

    I real delighted to find this website on bing, just what I was looking for : D also bookmarked .

  11. Hi there, just became alert to your blog through Google, and found that it’s truly informative. I am going to watch out for brussels. I’ll appreciate if you continue this in future. Numerous people will be benefited from your writing. Cheers!|

  12. powerbank より:

    Türkiye’nin power bank tedarik deposuna hosgeldiniz! Tasinabilir mobil sarj cihazlari günümüzün popüler ürünlerindendir! Artik teknolojiden ayri yasayamiyoruz ve hepimizin sikça yasadigimiz sorunlardan biri sarj bitmesi! Aldiginiz iyi bir power bank mobil sarj bu konudaki eksiginizi tamamlayacaktir! Sirketimiz dünya ticaretinin önemli merkezlerinden olan ISTOÇ’tan tüm Türkiye’ye ürün göndermektedir?.

  13. Sylvie Whal より:

    I am really impressed along with your writing abilities and also with the layout in your weblog. Is this a paid topic or did you customize it your self? Anyway keep up the nice high quality writing, it is rare to peer a nice weblog like this one these days..

  14. 匿名 より:

    Absolutely love this garden. Truly amazing!!

  15. Vous pouvez pas 茅changer vos id茅es sans vous exciter merde ?

  16. i would always love to hear those christmas music with a very happy tune,,

  17. Game PC Terbaru より:

    Nice post. I was checking constantly this blog and I’m impressed! Extremely helpful info specifically the last part 🙂 I care for such information a lot. I was seeking this particular info for a very long time. Thank you and best of luck.

  18. ELF Therapy より:

    hi!,I really like your writing so so much! proportion we communicate more approximately your article on AOL? I need a specialist on this house to unravel my problem. May be that is you! Having a look ahead to look you.

  19. Hello there, just turned into alert to your weblog through Google, and found that it is really informative. I am gonna watch out for brussels. I’ll be grateful for those who proceed this in future. A lot of people will be benefited from your writing

  20. Can I just now say such a relief to uncover somebody that truly knows what theyre talking about on-line. You in fact learn the best way to bring a worry to light and create it crucial. Lots much more individuals should really read this and appreciate this side of the story. I cant feel youre no additional well known once you absolutely offer the gift.

  21. 394589 815099The electronic cigarette makes use of a battery and a small heating aspect the vaporize the e-liquid. This vapor can then be inhaled and exhaled 435843

  22. buy wow gold より:

    we are ten years for wow,fastest delivery ,cheapest price on the market.do you interesting need some wow gold or powerleveing? please choose us,we will try our best for you .hope….

  23. Hi there, just become alert to your blog through Google, and located that it is truly informative. I am going to be careful for brussels. I’ll be grateful should you continue this in future. Many other people will be benefited from your writing

  24. Focus on needed extremely effective affiliate business how you are able to keep within managing strategies very good for your good web-based provider. alertpay

  25. Pour ceux et celles qui souhaitent attirer l’amour d’une personne, voici une recette simple de magie blanche utilisant une pomme de terre.

  26. I think this web site holds some really wonderful information for everyone. “Billy T-T-T-T-Today, Junior” by Billy Madison.

  27. Hello there, simply become aware of your blog through Google, and located that it’s truly informative. I am going to watch out for brussels. I will be grateful if you proceed this in future. Many other people might be benefited out of your writing

  28. Item as described. Thanks so much!
    [url=http://www.mit-lca.org/wholesale_UGG-3280-Bailey-Bow-Sale_16_1.html]ugg bailey bow tall[/url]

  29. I do consider all the ideas you’ve introduced for your post. They’re really convincing and will certainly work. Still, the posts are very short for starters. Could you please prolong them a bit from next time? Thanks for the post.

  30. After study a number of of the blog posts in your web site now, and I actually like your way of blogging. I bookmarked it to my bookmark website record and will likely be checking back soon. Pls take a look at my site as well and let me know what you think.

  31. I know this if off topic but I’mlooking into starting
    my own blog and was wondering what all is required to get setup?
    I’m assuming having a blog like yours would cost
    a pretty penny? I’m not very web savvy so I’m not 100% positive.
    Any tips or advice would be greatly appreciated. Cheers

9 Ping/トラックバック のために "【phpmyadmin】データベース文字化け(DreamWeaver)"
  1. Digg

    While checking out DIGG yesterday I found this

  2. Dreary Day

    It was a dreary day here today, so I just took to piddeling around on the internet and realized

  3. Digg

    While checking out DIGG yesterday I noticed this

  4. Tumblr article

    I saw someone writing about this on Tumblr and it linked to

  5. Shoes Store より:

    Wikia

    Wika linked to this site

  6. Afiliado expert より:

    Dreary Day

    It was a dreary day here yesterday, so I just took to piddeling around on the internet and found

  7. Binary Options より:

    Looking around

    I like to surf in various places on the web, often I will just go to Stumble Upon and read and check stuff out

  8. risk consulting より:

    Wikia

    Wika linked to this website

  9. Just Browsing

    While I was surfing yesterday I saw a great post concerning