Hi,
I have created a table called "Relations" in my Link SQL database & I would like to be able to show different fields from this Table using Globals!
So this is what I did:
1. First I created a table called "Relations" using MYSQLMAN then I created a .def file for this table!
2. I added a global called "related_news" here is the code:
my $tags = shift;
my $related_db = $DB->table('Relations');
my $id = $tags->{ID};
my $related_news = $related_db->get($id, 'HASH');
return $related_news;
}
3. Then I added <%related_news%> into my templates and it gives me the following error:
Can't locate Links/Options.pm in @INC (@INC contains: /home/virtual/mysite/home/httpd/CGIFiles/headlines/admin /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .) at /home/virtual/mysite/home/httpd/CGIFiles/headlines/admin/GT/Template.pm line 657. ,
Error: No subroutine 'Links::Options::related_info' in 'Links.pm'
sub related_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; }
All I want to do is to be able to call 2 fields from this table ("ID" & "RelatedTitle"). I would really appreciate it if you can help me with this ASAP. I have been trying to fix this up for hours now but no luck
Thanks in advance,
PCMANIA
I have created a table called "Relations" in my Link SQL database & I would like to be able to show different fields from this Table using Globals!
So this is what I did:
1. First I created a table called "Relations" using MYSQLMAN then I created a .def file for this table!
2. I added a global called "related_news" here is the code:
Code:
sub related_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;
}
3. Then I added <%related_news%> into my templates and it gives me the following error:
Code:
Error: Unable to load module: Links::Options. Reason: Can't locate Links/Options.pm in @INC (@INC contains: /home/virtual/mysite/home/httpd/CGIFiles/headlines/admin /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .) at /home/virtual/mysite/home/httpd/CGIFiles/headlines/admin/GT/Template.pm line 657. ,
Error: No subroutine 'Links::Options::related_info' in 'Links.pm'
sub related_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; }
All I want to do is to be able to call 2 fields from this table ("ID" & "RelatedTitle"). I would really appreciate it if you can help me with this ASAP. I have been trying to fix this up for hours now but no luck

Thanks in advance,
PCMANIA