This shop will be powered by Are you the store owner? Log in here
This shop will be powered by Are you the store owner? Log in here
PDOでutf-8の日本語入力データ(フォームデータ)を入れたら文字化けしてた(Mysql Query Borwser上で)。 同じくutf-8設定のRubyデータが文字化けしてないので、mysql内での設定は問題ないはず。 いろいろやってためしたところ、次の方法で一発解決。 $pdo = new PDO("mysql:host=localhost; dbname=phptest", "root", "pass"); $stmt = $pdo -> query("SET NAMES utf8;"); $stmt = $pdo->prepare("insert into hoge(name, count)values(:name, :count)"); : $stmt = $pdo -> query("SET NAMES utf8;");が重要。php.iniにcharset関係の設定は不要
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く