使用道具 举报
my $dsn = "DBI:mysql:database=food_db;host=localhost"; my $username = "username"; my $password = "password"; my $dbh = DBI->connect($dsn, $username, $password);
my $sth = $conn->prepare($sql_all); $sth->execute(@parameters);
while (my $row_data = $sth->fetchrow_hashref()) { # ... }
$dbh->disconnect();
本版积分规则 发表回复 回帖后跳转到最后一页