[% USE DBI %]
[% DBI.connect('dbi:mysql:phones', 'user', 'password')%]
This is what we have
[% FOREACH fone = DBI.query('SELECT * FROM nokia') %]
name : [% fone.modelno %]<br/>
desc : [% fone.desc %]<br/>
<img src="[% fone.image %]" width="60" height="60" alt="[% fone.mo
+delno %]" /><br/>
price: [% fone.price %]<br/>
[% END %]
<hr/>
my templatetoolkit.pl access this tt.file. i want templatetoolkit.pl to pass value of a variable which would change table name in this tt.file. i can do it with perl block but there must be a way which i cant find.i tried
[% select * from [% tablename %] %] which is stupid but hope it make sense what i am trying to achieve with Template Toolkit.
regards,