No such thing as a small change | |
PerlMonks |
(dkubb) Re: (2) HTML::Template, DBI and <TMPL_LOOP>'sby dkubb (Deacon) |
on Jan 04, 2004 at 00:02 UTC ( [id://318561]=note: print w/replies, xml ) | Need Help?? |
I believe the technique I was using was removed from DBI about 3 months after my post. It was replaced with a more elegant (IMHO) system that can replicate the same results with newer versions of DBI. In the earlier example I was trying get DBI to return an array reference of hash references with a single DBI method call. I don't see the need to break something up into multiple steps (prepare/execute/fetchall_arrayref) if DBI provides an all-in-one "utility method" that does these things underneath. Plus, as jeffa mentioned, it cuts down the number of places where you need to specify the names of the columns -- which is convenient if you ever need to make changes. Here's how I would do it using a more recent version of DBI:
Dan Kubb, Perl Programmer
In Section
Seekers of Perl Wisdom
|
|