Gossamer Forum
Home : General : Perl Programming :

Re: [SimonTOZ] simple Database count

Quote Reply
Re: [SimonTOZ] simple Database count In reply to
Ahh, yes, I should have caught that last night. You have two options:

1) Set die_on_bad_params to false
Code:
my $t = HTML::Template->new(filename => 'sig.tmpl', die_on_bad_params => 0);

2) Change your query to select only the fields you want in the template
Code:
# Query 1 to get desired records for your loop
my $last_five = q~SELECT imdbID, title
FROM videodata
WHERE Mediatype <> '50'
ORDER BY created DESC LIMIT 5~;

I almost always go with option 1 so that neither myself nor the designers I may be working with have to muck with my Perl or SQL code to make simple modifications to the templates.

~Charlie

Last edited by:

Chaz: May 14, 2004, 8:37 AM
Subject Author Views Date
Thread simple Database count SimonTOZ 5315 May 1, 2004, 5:17 AM
Thread Re: [SimonTOZ] simple Database count
Chaz 5173 May 13, 2004, 9:33 PM
Thread Re: [Chaz] simple Database count
SimonTOZ 5192 May 13, 2004, 11:05 PM
Thread Re: [SimonTOZ] simple Database count
Chaz 5166 May 14, 2004, 8:33 AM
Post Re: [Chaz] simple Database count
SimonTOZ 5142 May 14, 2004, 7:14 PM