This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/perl | |
use Win32::ODBC; | |
print "Content-type: text/html\n\n"; | |
print "<html>"; | |
print "<body>"; | |
$db= new Win32::ODBC("DSN=passwd"); | |
$db->Sql("SELECT * FROM password"); | |
# 取得したレコードセットの数だけループして表示 | |
while ( $db->FetchRow() ){ | |
undef %FIELDS; | |
# 各フィールドのデータをハッシュに格納 | |
%FIELDS= $db->DataHash(); | |
print "$FIELDS{'password'} $FIELDS{'keyword'}<BR>\n"; | |
} | |
# データベースを閉じる | |
$db->Close( ); | |
print "</body></html>"; | |
exit; |
0 件のコメント:
コメントを投稿