Home : Products : DBMan SQL : Discussion :

Products: DBMan SQL: Discussion: Re: [LanceWilson2] Table and Functions: Edit Log

Here is the list of edits for this post
Re: [LanceWilson2] Table and Functions
Hi,

Have a look at the script below:

sub GetCarrier {
my $id = shift;
my $tags = GT::Template->tags;
my $info = $tags->{home}->{sql}->table('Patients')->get($id);
return $info->{Carrier};
}

Now you can call it from the template by <%Dbsql::custom::GetCarrier('Wilson')%>. Ensure that 'id' is primary key field.

By the way, you can create a global template instead of adding a new pm file.

TheStone.

B.

Last edited by:

TheStone: Jan 6, 2003, 10:31 AM

Edit Log: