The problem you are asking about is:
$sql = "select distinct Volunteer from Volunteer where Volunteer =? an
+d Date =?";
my $sth = $dbh->selectcol_arrayref( $sql, undef, $name, $date );
You setup the sql statement but never execute it.|
Update: as
particle and
jellyfish have pointed out I was off on this. The $dbh handle is undefined at this point.
You have some other problems in your code that are making it difficult for you to find errors like these.
You are not running under warnings, I know this because I spotted you problem when I ran this script under warnings and it gave me Can't call method "selectcol_arrayref" on an undefined value
You are also not running under use strict
You will find it daunting when you first turn on strict and warnings on this script (I got around 45 errors when I ran your script with warnings and strict), but trust as someone who was in a similar situation, It's not that bad. It'll take you 30 minutes to get rid of those errors, but I will <cajun chef>guarantee</cajun chef> you will save hours of debugging.
grep
grep> cd /pub grep> more beer |