Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Alex : Globals

Quote Reply
Alex : Globals
Hi Alex,

I have been trying to create a global that reads my data from a new table in LinkSQL, I was able to do so using the following code (the global name is realated_news) :

Code:
sub {
my $tags = shift;
my $related_db = $DB->table("Relations");
my $id = $tags->{ID};
my $related_news = $related_db->get($id, "HASH");
return $related_news;
}

I have 3 fields in my Relations table, the first one is called ID (primary key) Second one is LinkID and the third one is RelationTitle.

The tag that I am using is <%related_news%><%RelationTitle%> and this shows the RelationTitle field based on the ID field!

Now the problem is that I want to be able to do the above using the LinkID field instead of the ID field (primary key).

I tried to replace
Code:
my $id = $tags->{ID};

with

Code:
my $id = $tags->{LinkID};

but it gives me an error "Unknown Tag: 'RelationTitle'"

Please help me with this!

Thanks,
PCMANIA

Last edited by:

pcmania: Jan 29, 2002, 8:10 AM
Subject Author Views Date
Thread Alex : Globals pcmania 4844 Jan 29, 2002, 8:09 AM
Thread Re: [pcmania] Alex : Globals
jean 4743 Jan 29, 2002, 4:07 PM
Thread Re: [jean] Alex : Globals
pcmania 4753 Jan 30, 2002, 8:31 AM
Thread Re: [pcmania] Alex : Globals
Paul 4742 Jan 30, 2002, 8:32 AM
Thread Re: [RedRum] Alex : Globals
pcmania 4760 Jan 30, 2002, 8:36 AM
Thread Re: [pcmania] Alex : Globals
Paul 4804 Jan 30, 2002, 8:38 AM
Thread Re: [RedRum] Alex : Globals
pcmania 4722 Jan 30, 2002, 8:43 AM
Post Re: [pcmania] Alex : Globals
jean 4701 Jan 30, 2002, 9:57 AM
Thread Re: [pcmania] Alex : Globals
Alex 4697 Jan 30, 2002, 3:04 PM
Thread Re: [Alex] Alex : Globals
pcmania 4646 Feb 3, 2002, 9:47 AM
Thread Re: [pcmania] Alex : Globals
Paul 4663 Feb 3, 2002, 9:55 AM
Post Re: [RedRum] Alex : Globals
pcmania 4658 Feb 3, 2002, 10:42 AM