Gossamer Forum
Home : Products : Gossamer Links : Discussions :

New Table + Globals

Quote Reply
New Table + Globals
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:

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 Unsure

Thanks in advance,
PCMANIA
Subject Author Views Date
Thread New Table + Globals pcmania 4879 Jan 25, 2002, 9:26 AM
Thread Re: [pcmania] New Table + Globals
Alex 4779 Jan 25, 2002, 12:43 PM
Thread Re: [Alex] New Table + Globals
pcmania 4790 Jan 25, 2002, 1:51 PM
Thread Re: [pcmania] New Table + Globals
brewt 4762 Jan 25, 2002, 1:54 PM
Thread Re: [brewt] New Table + Globals
pcmania 4760 Jan 25, 2002, 10:03 PM
Thread Re: [pcmania] New Table + Globals
brewt 4736 Jan 25, 2002, 11:55 PM
Thread Re: [brewt] New Table + Globals
pcmania 4708 Jan 26, 2002, 8:24 AM
Thread Re: [pcmania] New Table + Globals
pcmania 4688 Jan 28, 2002, 12:41 PM
Post Re: [pcmania] New Table + Globals
pcmania 4673 Jan 28, 2002, 12:58 PM
Post Re: [brewt] New Table + Globals
Mark2 4347 Mar 13, 2007, 12:47 PM