This Thread is a continuation from the following Thread:
http://www.gossamer-threads.com/...um3/HTML/003579.html
Okay...I have experimented with using a portion of the Relational Mod for DBMAN with LINKS in the detail.cgi script that Widgetz was kind to have written.
What I have done is the following:
1) Add two new sub-routines to the detail.cgi file:
#-----------------------------------------------------
@db_cols = qw(ID Title URL Date Category AltCategories Description 'Contact Name' 'Contact Email' Hits isNew isPopular Rating Votes ReceiveMail isDetailed isAward AwardDate);
$db_file_name = "/mnt/web/guide/anthrotech/cgibin/wwwvl/data/testlinks.db";
}
AND
#-----------------------------------------------------
@db_cols = qw(ReviewID Reviewer DateReviewed Navigation NavDescrip Graphics GraphDescrip Information InformDescrip Overall TotalScore);
$db_file_name = "/mnt/web/guide/anthrotech/cgibin/wwwvl/data/testreviews.db";
$db_key_pos = 0;
}
2) Added a new sub-routine where the fields are printed into a web page from the cgi script. I have added the following codes:
&switch_to_reviews;
my (%rec2) = &get_record ($rec{'ReviewID'});
&switch_to_links;
I have also used codes like the following to print fields in the web page:
taken from the links.db file
AND
taken from the reviews.db file
You can see the complete script at the following URL:
www.anthrotech.com/tmp/testdetail.txt
My main goal is to print fields from the two databases into one detailed view for each record. The common field between the databases is the "ID" field signified as ID in links.def and ReviewID in reviews.def.
Anyone have ideas about how to make this work?
Thanks in advance.
Regards.
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------
http://www.gossamer-threads.com/...um3/HTML/003579.html
Okay...I have experimented with using a portion of the Relational Mod for DBMAN with LINKS in the detail.cgi script that Widgetz was kind to have written.
What I have done is the following:
1) Add two new sub-routines to the detail.cgi file:
Code:
sub switch_to_links { #-----------------------------------------------------
@db_cols = qw(ID Title URL Date Category AltCategories Description 'Contact Name' 'Contact Email' Hits isNew isPopular Rating Votes ReceiveMail isDetailed isAward AwardDate);
$db_file_name = "/mnt/web/guide/anthrotech/cgibin/wwwvl/data/testlinks.db";
}
AND
Code:
sub switch_to_reviews { #-----------------------------------------------------
@db_cols = qw(ReviewID Reviewer DateReviewed Navigation NavDescrip Graphics GraphDescrip Information InformDescrip Overall TotalScore);
$db_file_name = "/mnt/web/guide/anthrotech/cgibin/wwwvl/data/testreviews.db";
$db_key_pos = 0;
}
2) Added a new sub-routine where the fields are printed into a web page from the cgi script. I have added the following codes:
Code:
my (%rec) = &get_record ($in{'ID'}); &switch_to_reviews;
my (%rec2) = &get_record ($rec{'ReviewID'});
&switch_to_links;
I have also used codes like the following to print fields in the web page:
Code:
$rec{'Title'}taken from the links.db file
AND
Code:
$rec2{'Reviewer'}taken from the reviews.db file
You can see the complete script at the following URL:
www.anthrotech.com/tmp/testdetail.txt
My main goal is to print fields from the two databases into one detailed view for each record. The common field between the databases is the "ID" field signified as ID in links.def and ReviewID in reviews.def.
Anyone have ideas about how to make this work?
Thanks in advance.
Regards.
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------