⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bind.pl

📁 perl learn perl by examples
💻 PL
字号:
use DBI;
$dbname = 'DEMO732'; $user = 'scott'; 
$password = 'tiger'; $dbd = 'Oracle';
$dbh = DBI->connect ($dbname, $user, $password, $dbd); 
if (!$dbh) {
     print "Error connecting to database; $DBI::errstr\n";
}


$sth = $dbh->prepare(q{select name, age from emptable where age < 40});
$sth->execute();
die "Prepare error: $DBI::err .... $DBI::errstr" if $DBI::err;

$sth->bind_columns(undef, \($name, $age));
# Column binding is the most eficient way to fetch data
while($sth->fetch) {
    print "$name: $age\n";
}

$sth->finish();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -