$sth = $dbh->prepare("SELECT year from trees WHERE sport = \'$sport\' AND year = + \'$year\'")
|| die "couldn't prepareSQL statement";
$sth->execute || die "can't execute sql statement";
my @row;
while (@row = $sth->fetchrow_array()) {
$year = $row[0];
}
####
$sth = $dbh->prepare('SELECT year
FROM trees
WHERE sport = ?
AND
year = ?'
);
####
$sth->execute($sport, $year) or
die "Can't execute: ". $db->errstr(). "\n";
####
my ($year) = $sth->fetchrow();
####
for (1.. $compsize *2 -1) {
$teams{"team$_"} = $cgi->param("team$_");
$scores{"score$_"} = $cgi->param("score$_");
}
####
print "\n";
foreach ( $cgi->param) {
print "- $_: '", $cgi->param($_) ,"'\n";
}
print "
\n";