in reply to Template Stuff
Always use an AoH for this. You can get your result as hash from DBI and push it into an array. Use a loop in your templates to fill your table. Of course you still have to change your templates but you don't have to maintain your code if you make changes to your database.