Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Idiomatic way of getting from database result set to HTML::Template data structure?by davehodg (Acolyte) |
on Mar 29, 2004 at 14:18 UTC ( [id://340611]=perlquestion: print w/replies, xml ) | Need Help?? |
davehodg has asked for the wisdom of the Perl Monks concerning the following question:
I have a flat result set from a database, joining across three tables, for the sake of this example, call them magazines, issues and articles. Each magazine has a name, each issue a number and each article a name.
The result set comes back something like:
Straightforward stuff so far. Now, that structure needs to be mangled into something totally different for the benefit of HTML::Template whilst maintaining the order of things: I've probably mislaid some parens there but hey. So what's a nice way of transmogrifying the former into the latter whilst preserving the order of things? TIA,
Back to
Seekers of Perl Wisdom
|
|