Home : Products : DBMan SQL : Discussion :

Products: DBMan SQL: Discussion: Re: [Dempsey] Anybody Home?????: Edit Log

Here is the list of edits for this post
Re: [Dempsey] Anybody Home?????
I figured out my answer with help from this thread

sub {
my $tags = GT::Template->tags;
my $id = $tags->{ID};
my ($table, $field) = @_;
my $sth = $DB->table($table)->select({ $field => $id});
my @output;
while (my $rs = $sth->fetchrow_hashref ) {
push @output, $rs;
return { loop_hash => \@output };

Change {ID} if neccessary to the ID column name, and call with:

<%name_of_above_sub('related_table_name', 'related_column_in_related_table')%>

Last edited by:

Dempsey: Sep 5, 2009, 2:48 PM

Edit Log: