I'll give you an example of something I use and perhaps this will provide a solution. This is from a classifieds system which has 7 databases. When I view a User from the user databasewant I use the following to display all the ads within the other 6 databases. This is just an example of one.
print qq|
<table width=450><TR><TD><$font><B>Current Classifieds:</B></font></TD></TR>|;
&switch_to_announce;
undef %in;
$in{'UserID'} = $rec{'UserID'};
$in{'mh'} = 50;
my ($status2,@hits2) = &query("view");
if ($status2 eq "ok") {
my ($numhits2) = ($#hits2+1) / ($#db_cols+1);
for (0 .. $numhits2 - 1) {
%rec2 = &array_to_hash($_, @hits2);
print qq| <TR><TD><$font><A HREF="$db_script_url?db=announce&uid=$db_uid&ItemID=$rec2{'ItemID'}&view_records=1">$rec2{'ItemID'}</A> - $rec2{'Category'} - $rec2{'Title'}</font> </td></tr> |;
}
}
print qq|</table></CENTER><P>|;
Something like this would provide the display you are looking for without having to store the ID numbers and then make links. The above provides links automatically.
Hope this helps
Unoffical DBMan FAQ
http://creativecomputingweb.com/dbman/index.shtml/
print qq|
<table width=450><TR><TD><$font><B>Current Classifieds:</B></font></TD></TR>|;
&switch_to_announce;
undef %in;
$in{'UserID'} = $rec{'UserID'};
$in{'mh'} = 50;
my ($status2,@hits2) = &query("view");
if ($status2 eq "ok") {
my ($numhits2) = ($#hits2+1) / ($#db_cols+1);
for (0 .. $numhits2 - 1) {
%rec2 = &array_to_hash($_, @hits2);
print qq| <TR><TD><$font><A HREF="$db_script_url?db=announce&uid=$db_uid&ItemID=$rec2{'ItemID'}&view_records=1">$rec2{'ItemID'}</A> - $rec2{'Category'} - $rec2{'Title'}</font> </td></tr> |;
}
}
print qq|</table></CENTER><P>|;
Something like this would provide the display you are looking for without having to store the ID numbers and then make links. The above provides links automatically.
Hope this helps
Unoffical DBMan FAQ
http://creativecomputingweb.com/dbman/index.shtml/