post by yamamoto | 0 | 1,114 views

perl memo データベース接続(postgresql)

#DBに接続
sub db_connect{
    use DBI;
        $user="wiki";
        $pass="wiki";
        $ds="DBI:Pg:dbname=wiki";
        $dbh=DBI->connect($ds,$user,$pass) or die "Connect error: ".DBI::errstr;
}

Comments are closed.