Carol,
Everytime I have a question (as well as everybody else), I'm always amazed at how you have the time and patience to help!
Of course, I have another question as well! :-)
I'm needing to do two things... One is display the number of items in a record field (I already know that it is either a yes or no in the field) - and the other is to wrap a predefined URL (one that searches the database) around each of those numbered results.
I'm using the following to get the results:
if ($db_use_flock) { flock(DB, 1); }
@lines = <DB>; # Slurp the database into @lines..
close DB;
$total_count=scalar(@lines);
foreach $line (@lines) {
@data = split (/\Q$db_delim\E/o, $line);
if ($data[8]) {
++$count8{$data[8]};
}
if ($data[9]) {
++$count9{$data[9]};
}
if ($data[10]) {
++$count10{$data[10]};
}
if ($data[11]) {
++$count11{$data[11]};
}
}
And the URL works out in my case to be:
However, because you're displaying the results of the record search as:
I am unable to wrap a different search URL for each of the items returned.
Because I know all the possibilities, is there some how I can format the results better in HTML so I can wrap a URL around each one?
I'm thinking that the thread at http://www.gossamer-threads.com/...m12/HTML/000235.html may be my ticket, but I'm unsure.
I'm guessing that if I can open the database and say "How many 'yes's' are in field 14" I could wrap a URL around that number. The problem comes into play when there are loops that affect the HTML code as well as the dynamic code in the database.
Any ideas on how to pull that off?
Thanks again!
Dave
Everytime I have a question (as well as everybody else), I'm always amazed at how you have the time and patience to help!
Of course, I have another question as well! :-)
I'm needing to do two things... One is display the number of items in a record field (I already know that it is either a yes or no in the field) - and the other is to wrap a predefined URL (one that searches the database) around each of those numbered results.
I'm using the following to get the results:
Code:
open (DB, "<$db_file_name") or &cgierr("error unable to open db file: $db_file_name.\nReason: $!"); if ($db_use_flock) { flock(DB, 1); }
@lines = <DB>; # Slurp the database into @lines..
close DB;
$total_count=scalar(@lines);
foreach $line (@lines) {
@data = split (/\Q$db_delim\E/o, $line);
if ($data[8]) {
++$count8{$data[8]};
}
if ($data[9]) {
++$count9{$data[9]};
}
if ($data[10]) {
++$count10{$data[10]};
}
if ($data[11]) {
++$count11{$data[11]};
}
}
And the URL works out in my case to be:
Code:
<A HREF="$db_script_link_url&ID=&Complete=No&mh=10&sb=0&so=ascend&view_records=View+Records">Complete:</A>However, because you're displaying the results of the record search as:
Code:
foreach $type (keys %count10) { print qq|$type - $count10{$type}I am unable to wrap a different search URL for each of the items returned.
Because I know all the possibilities, is there some how I can format the results better in HTML so I can wrap a URL around each one?
I'm thinking that the thread at http://www.gossamer-threads.com/...m12/HTML/000235.html may be my ticket, but I'm unsure.
I'm guessing that if I can open the database and say "How many 'yes's' are in field 14" I could wrap a URL around that number. The problem comes into play when there are loops that affect the HTML code as well as the dynamic code in the database.
Any ideas on how to pull that off?
Thanks again!
Dave