Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [kevinws] I see hidden fields

Quote Reply
Re: [kevinws] I see hidden fields In reply to
In your first message you posted the following code -

sub {
my $table = shift;
my $results = $DB->table($table)->select()->fetchall_hashref;
return { loop_select => $results };
}


It should be -

sub {
my $table = 'table_name';
my $results = $DB->table($table)->select()->fetchall_hashref;
return { loop_select => $results };
}

See if that makes a difference.

If you use my code it should look something like -

sub {
#Include all tags
my $tags = GT::Template->tags;
#Pull the field from the database
my ($some_name) = $DB->table('t_phonec')->select({field_name_in_other_table => $tags->{field_name_in_search_results} }, ['phonec_id'])->fetchrow_array();
#Assign the field to $tags
$tags->{phonec_id}=$some_name;
#Return. The field should be available in your template as <%phonec_id%>
return; }

**You need to give it a field in both tables to search on, I don't know your table set up so I can't give you the field names.



One of the above should help.

Simon
Subject Author Views Date
Thread I see hidden fields jaspercram 11565 Oct 14, 2002, 4:07 AM
Thread Re: [jaspercram] I see hidden fields
timbo 11197 Aug 28, 2003, 8:36 AM
Post Re: [timbo] I see hidden fields
ecamty 11155 Sep 3, 2003, 11:10 AM
Thread Re: [jaspercram] I see hidden fields
YoYoYoYo 11197 Sep 3, 2003, 11:50 PM
Thread Re: [YoYoYoYo] I see hidden fields
timbo 11147 Sep 14, 2003, 2:30 AM
Post Re: [timbo] I see hidden fields
jai 11104 Sep 16, 2003, 4:10 PM
Thread Re: [YoYoYoYo] I see hidden fields
kevinws 11143 Sep 15, 2003, 1:03 PM
Thread Re: [kevinws] I see hidden fields
jai 11112 Sep 16, 2003, 3:57 PM
Post Re: [jai] I see hidden fields
kevinws 11090 Sep 17, 2003, 6:50 AM
Thread Re: [jai] I see hidden fields
kevinws 11086 Sep 17, 2003, 2:36 PM
Thread Re: [kevinws] I see hidden fields
kevinws 11100 Sep 17, 2003, 2:47 PM
Thread Re: [kevinws] I see hidden fields
jai 11119 Sep 17, 2003, 4:38 PM
Thread Re: [jai] I see hidden fields
kevinws 11084 Sep 18, 2003, 8:10 AM
Thread Re: [kevinws] I see hidden fields
jai 11096 Sep 18, 2003, 3:56 PM
Thread Re: [jai] I see hidden fields
kevinws 11060 Sep 19, 2003, 6:39 AM
Post Re: [kevinws] I see hidden fields
TIF 10581 Apr 3, 2006, 8:05 PM
Post Re: [jaspercram] I see hidden fields
kevinws 11121 Sep 15, 2003, 1:07 PM