YanoRyuichi.com/
Wiki
Blog
GitHub
Sandbox
開始行:
* 接続/切断 [#g4349098]
** DSN [#l7129823]
# MySQL
$dsn = "DBI:mysql:database=$database;host=$hostname;port...
# PostgreSQL
$dsn = "dbi:Pg:dbname=$dbname;host=$host;port=$port";
# SQLite
$dsn = "dbi:SQLite:dbfile.db";
** 接続/切断 [#pdcbd776]
$dbh = DBI->connect($dsn, $user, $pass, {RaiseError=>1, ...
$dbh->disconnect;
** 結果セットの文字列をUTF8フラグ付きにする [#sb7da176]
my $dbh = DBI->connect( $DSN, 'user', 'pass', { pg_enabl...
- MySQLの場合: mysql_enable_utf8 => 1
終了行:
* 接続/切断 [#g4349098]
** DSN [#l7129823]
# MySQL
$dsn = "DBI:mysql:database=$database;host=$hostname;port...
# PostgreSQL
$dsn = "dbi:Pg:dbname=$dbname;host=$host;port=$port";
# SQLite
$dsn = "dbi:SQLite:dbfile.db";
** 接続/切断 [#pdcbd776]
$dbh = DBI->connect($dsn, $user, $pass, {RaiseError=>1, ...
$dbh->disconnect;
** 結果セットの文字列をUTF8フラグ付きにする [#sb7da176]
my $dbh = DBI->connect( $DSN, 'user', 'pass', { pg_enabl...
- MySQLの場合: mysql_enable_utf8 => 1
ページ名: