ViaThinkSoft CodeLib
This article is in:
CodeLib → Programming aids → Perl
#!/usr/bin/perl
use DBI;
my $dsn = 'DBI:mysql:datenbankname:localhost';
my $db_user_name = '...';
my $db_password = '...';
my $dbh = DBI->connect($dsn, $db_user_name, $db_password);
my $sth = $dbh->prepare("SELECT ...");
$sth->execute;
my @Daten;
while (@Daten = $sth->fetchrow_array())
{
print $Daten[0];
}
$dbh->disconnect();
exit;
Daniel Marschall
ViaThinkSoft Co-Founder
ViaThinkSoft Co-Founder