Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Postprocess Template Toolkit DBI Call

by sierpinski (Chaplain)
on Aug 05, 2010 at 13:59 UTC ( [id://853138]=note: print w/replies, xml ) Need Help??


in reply to Postprocess Template Toolkit DBI Call

Yes, I'm sure someone has done something similar before...

I'm not sure I understand the reason for your posting. Are you having a problem or an error of some type? Are you looking for a better way to do it? Let us know what kind of response you're hoping for, and we might be able to help.
  • Comment on Re: Postprocess Template Toolkit DBI Call

Replies are listed 'Best First'.
Re^2: Postprocess Template Toolkit DBI Call
by aptom (Novice) on Aug 06, 2010 at 00:00 UTC
    Apologies for not being clear.
    What I'd like to do is push values returned from a DBI query within Template into a hash and then process that hash.
    I am unsure on how to do this.
    Thanks,
    Ap
      Taken me a few days but think I've nutter it out.
      [% sql_entries = query.execute() %] [% terms = {} %] [% FOREACH row IN sql_entries; terms.${row.LOCATION} = "${row.LOCID}"; END %] [% FOREACH row IN terms.keys %] [% row %]: [% terms.$row %] [% END %]

      Note: LOCATION and LOCID are columns returned from the query

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-25 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found