Home : Products : DBMan SQL : Discussion :

Products: DBMan SQL: Discussion: Re: [ManuGermany] SELECT QUESTION: Edit Log

Here is the list of edits for this post
Hi Manu,

As you mentioned that StoreID is not a primary key in 'stores' table, so you cannot use the 'queries' feature which is very useful for relational database.

In your case, you can create a global template which will get product's information:

sub {
my $tags = GT::Template->tags;
my $record = $tags->{results}[$tags->{row_num}-1];
my $store_id = $record->{StoreID};
my $info = $tags->{home}->{sql}->table('stores')->get({ StoreID => $store_id });
return %$info;

Change search_results.html like:

<%loop results%>
......<%StoreNames%> <%LogoURL%>

P.s: I think that you should use the 'queries' feature which is much faster than this way.



Last edited by:

TheStone: Jan 7, 2003, 10:31 AM

Edit Log: