in reply to Why won't my form print to screen

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

    Replies are listed 'Best First'.
    Re: Re: Why won't my form print to screen
    by gellyfish (Monsignor) on Mar 05, 2002 at 09:38 UTC

      You setup the sql statement but never execute it.

      Er, isn't that what selectcol_arraryref() does ? - it combines the prepare(),execute and fetch into one method - see the DBI manpage for more on this

      /J\