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) :
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
with
but it gives me an error "Unknown Tag: 'RelationTitle'"
Please help me with this!
Thanks,
PCMANIA
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