If you have a more advanced query like this one:
in reply to Re^6: My doubts about using fetchall_arrayref
in thread My doubts about using fetchall_arrayref
Then you can call the version of _all_data() that I gave above as either:
my $sql = "select id, account_number, CONVERT(VARCHAR(10),date,101) as
from my_table where id <> ''
order by date desc";
my @columns = qw( id account_number date );
my $results = $self->_all_data($sql, \@columns);
They will both get the same result set.
my $results = $self->_all_data($sql);