Carol,
I did that, but got an error message:
Code:
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: Can't use subscript on subroutine entry at ./rosters_html.pl line 527, near ""view"}"
(Did you mean $ or @ instead of &?)
Thats what originally prompted me to change the "&"
Here's the code I've got:
Code:
undef %in;
&switch_to_players;
$in{'Team'} = "Pittsburgh Pirates";
$in{'sb'} = 2; # Change to the number of the field you want to sort by
$in{'mh'} = 100; # To make sure you get them all
my ($status2,@hits2) = &query{"view"};
if ($status2 eq "ok") {
my ($numhits2) = ($#hits2+1) / ($#db_cols+1);
print "<table>";
for (0 .. $numhits2 - 1) {
%rec2 = &array_to_hash($_, @hits2);
print "<TR><TD>$rec2{'Last'}, $rec2{'First'} - $rec2{'Team'}</TD></TR>";
}
print "</table>";
}
I may not know much about this, but to me it looks like the code I've got there now really ought to work...
Chris