dump_results()
$sth->dump_results(length,row_delimiter,column_delimiter,filehandle})
This function displays the results of a statement using the
neat_list() function on each row for the
statement handle given. The first argument is the maximum length of
each column’s display. For columns containing more characters than the
maximum length, the excess will be omitted and ellipses will be
presented in its place. The default length is 35 characters. For the
second argument, the delimiter for each row may be given—the default
is \n. The delimiter for columns may also be
changed from the default of a comma and a space in the third argument.
In the last argument of the function, a file handle that specifies
where to direct the results of the function may be given. If one is
not specified, stdout is used. Here is an
example:
...
my $sql_stmnt = "SELECT title, authors
FROM books
WHERE author= 'Henry James' LIMIT 3";
my $sth = $dbh->prepare($sql_stmnt);
$sth->execute();
$results = $sth->dump_results(10, "\n", '|');
...The results of this program would look like this:
'The Boston...'|'Henry James' 'The Muse'|'Henry James' 'Washington...'|'Henry James' 3 rows