Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [kjetilpa] How include data from another table?

Quote Reply
Re: [kjetilpa] How include data from another table? In reply to
You can do something like that by using the globals in Dbsql 2.0.3. Just add the sub below to your globals:

Code:
include1 => sub {
my $tags = shift;
$tags->{home}->{cgi}->{db} = 'books';
$tags->{home}->{cgi}->{do} = 'search_results';
$tags->{home}->{cgi}->{details} = '0';
$tags->{home}->{cgi}->{category} = 'barnets navn';
my $results = $tags->{home}->search_results;
return $tags->{home}->print('search_results.html',$results);
}



then add a tag like <%include1%> into your template file where you want to display the include results. You can also copy search_results.html to another name and change the name above (in blue)


Cheers,
jean@Gossamer Threads
Subject Author Views Date
Thread How include data from another table? kjetilpa 3977 Mar 11, 2002, 8:45 AM
Thread Re: [kjetilpa] How include data from another table?
jean 3846 Mar 12, 2002, 10:09 AM
Thread Re: [jean] How include data from another table?
kjetilpa 3846 Mar 12, 2002, 12:16 PM
Thread Re: [kjetilpa] How include data from another table?
jean 3848 Mar 12, 2002, 12:40 PM
Thread Re: [jean] How include data from another table?
kjetilpa 3807 Mar 14, 2002, 11:58 AM
Post Re: [kjetilpa] How include data from another table?
jean 3795 Mar 14, 2002, 12:11 PM