Hi ,
I wrote this code to extract data from a database
sub {
my $tags = GT::Template->tags;
my($accountid,$clientid,$output);
my($table33,$sth33);
$accountid = $tags->{AccountID};
$table33 = $DB->table('tblClients');
$sth33 = $table33->select (['ClientID'], {AccountID => $accountid});
$sth33->execute();
$clientid = $sth33->fetchrow();
$output= $clientid;
return $output;
}
I call this global ... in a file ... <% global-nAME%> . intead of executing the global and printing the client ID .. it prints the whole code ( subroutine) itself ..
how do i get about this ..
I wrote this code to extract data from a database
sub {
my $tags = GT::Template->tags;
my($accountid,$clientid,$output);
my($table33,$sth33);
$accountid = $tags->{AccountID};
$table33 = $DB->table('tblClients');
$sth33 = $table33->select (['ClientID'], {AccountID => $accountid});
$sth33->execute();
$clientid = $sth33->fetchrow();
$output= $clientid;
return $output;
}
I call this global ... in a file ... <% global-nAME%> . intead of executing the global and printing the client ID .. it prints the whole code ( subroutine) itself ..
how do i get about this ..