Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: My doubts about using fetchall_arrayref

by CountOrlok (Friar)
on Apr 02, 2013 at 14:02 UTC ( #1026695=note: print w/ replies, xml ) Need Help??


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

Yes. Though, to be nit-picky, in your example the third item in the list should be date, not box.


Comment on Re^3: My doubts about using fetchall_arrayref
Re^4: My doubts about using fetchall_arrayref
by hdb (Parson) on Apr 02, 2013 at 14:10 UTC

    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); ...
      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.
Re^4: My doubts about using fetchall_arrayref
by Anonymous Monk on Apr 02, 2013 at 14:12 UTC
    Yes, my fault, but doing that whay I am getting an error now with HTML::Template:
    There has been an error: HTML::Template::param() : attempt to set para +meter 'results' with a scalar - parameter is not a TMPL_VAR!<br> Any idea why?
      can you show the code that is populating the template file?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1026695]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-07-23 07:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (135 votes), past polls