Ive been working on this for a while now, and I cant seem to figure it out.
I decided that I wanted to use HTML::Template for a online phone application that Im doing. I need to basically take rows of data from a database, and pass the values to HTML::Template's
param() function, in a way that in my .tmpl file, I can go:
<TMPL_LOOP NAME=EMPLOYEE_INFO>
Name: <TMPL_VAR NAME=NAME> <P>
Job: <TMPL_VAR NAME=JOB> <P>
<P>
</TMPL_LOOP>
(Stolen from the docs). My problem is that HTML::Template's
param() function expects an arrayref, and, even with DBI's
fetchrow_arrayref() function, I dont see how I can get *all* the rows into a single arrayref that I can pass to HTML::Template's
param().
Thanks for any and all help!
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.