May 2005
Intermediate to advanced
352 pages
14h 39m
English
fetchrow_array( )
$statement_handle->fetchrow_array( )This returns one row from the results of a statement handle in the form of an array, each of whose element is a column.
...
my $sql_stmnt = "SELECT title, author FROM books";
my $sth = $dbh->prepare($sql_stmnt);
$sth->execute( );
while (my ($title, $author) = $sth->fetchrow_array( ){
print "$title by $author \n";
}
$sth->finish( );Read now
Unlock full access