$dbh = DBI->connect("DBI:Pg:dbname=dbname;host=hostname","username","password",{AutoCommit => 1}) || warn $DBI::errstr; $sth = $dbh->prepare("SELECT * FROM テーブル名"); $sth->execute(); for ($i = 0; $i < $sth->{NUM_OF_FIELDS} ; $i++){ print $sth->{NAME}->[$i]... > このページを見る
最終更新時間:
2008年01月06日18時35分
みんなのブックマーク 人気(0) 新着
- >カラム名を取得するには $sth->{NAME}を使用すればよい
- Perl DBI を使用してテーブルのカラム名を取得する方法を解説してゐる。









