Thanks again, all! I have found the way to make fetchall_arrayref() act as expected - good ol' O'Reilly saves the day. To make fetchall_arrayref() pass a reference to an array of references to hashes (instead of a reference to an array of hashes - very subtle diference, but error prone in this need): merely pass the method a template hash to use internally as an example. i.e.:

my $arrayref = $sth->fetchall_arrayref({ FieldID =>1, Fieldname2 =>1, Fieldname3 =>1, Fieldname4 =>1, }); $template->param(table1 => $arrayref);


Update:Or even more simply:
my $arrayref = $sth->fetchall_arrayref({}); $template->param(table1 => $arrayref);


This worked exactly as expected and dropped both code size and execution time dramaticly. Not to mention leaving me with HTML::Template's standard HTML file style that my clients can mess with easily without having to learn anything new. No sense re-writing the wheel, when it does what it is supposed to - once i learned HOW it does it. Took a bit of reading the source of the DBI and HTML libs though. Guess I need to really brush up on passing of references for stuff like this.

In reply to The fetchall_answer! by growlf
in thread By ref or by ..well..ref! by growlf

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.