in reply to Re^3: My doubts about using fetchall_arrayref
in thread My doubts about using fetchall_arrayref

As there is redundant information in the sql statement and the list of columns, you could also do

... my @columns = qw( id account_number date ); my $sql = "select ".join( ",", @columns). " from my_table where id <>'' order by date desc"; my $results = $self->_all_data($sql, \@columns); ...

Replies are listed 'Best First'.
Re^5: My doubts about using fetchall_arrayref
by CountOrlok (Friar) on Apr 02, 2013 at 14:58 UTC
    hdb: see my post below about "the_date". It could be that the query is going to do some reformatting of the columns (convert, concatenation, etc) and so trying to join the @columns into the $sql may not be a good idea.