F
Fred
The code fragment below will print all rows in the
table mytable. If there are say 3 fields in mytable,
field1, field2, and field3, how would I get all of
the values into each field? That is, break up
each row by field into variables?
-Thanks
my $dbh = DBI->connect(
"dbig:dbname=$dbname;host=$host;port=$port",
$username, ' '
) or die $!;
my $sth = $dbh->prepare("select * from mytable");
$sth->execute();
while ( @row = $sth->fetchrow_array ) {
print "@row\n";
}
table mytable. If there are say 3 fields in mytable,
field1, field2, and field3, how would I get all of
the values into each field? That is, break up
each row by field into variables?
-Thanks
my $dbh = DBI->connect(
"dbig:dbname=$dbname;host=$host;port=$port",
$username, ' '
) or die $!;
my $sth = $dbh->prepare("select * from mytable");
$sth->execute();
while ( @row = $sth->fetchrow_array ) {
print "@row\n";
}