I've been trying to get a simple global routine (named "wax_count") to work with with DBSQL which I added using the Templates Global form.
Here's the code:
*****************
sub {
my $wax_db = $DB->table ('wax');
my $count = $wax_db->total;
return $count;
}
****************
in my template I put the tag <%wax_count%> (home.html), which generates the unable to compile error.
What am I doing wrong? I can get it to print text all day but as soon as I try to query a table I fail (at least I'm consistent).
Thanks,
Earl
Here's the code:
*****************
sub {
my $wax_db = $DB->table ('wax');
my $count = $wax_db->total;
return $count;
}
****************
in my template I put the tag <%wax_count%> (home.html), which generates the unable to compile error.
What am I doing wrong? I can get it to print text all day but as soon as I try to query a table I fail (at least I'm consistent).
Thanks,
Earl