mnlight has asked for the wisdom of the Perl Monks concerning the following question:
foreach $date ( @volunteer_date ) { my $sql = "select distinct Volunteer from Volunteer where Volu +nteer =? and Date =?"; my $sth = $dbh->selectcol_arraryref( $sql, undef ); execute($name, $date); $chk = $sth->[0]; #Verify the parent is not signed up. if ($chk eq $name){ print $query->h1({-align=>'center'}, "You are already signed u +p for this date: $date"); } #end if statement #process the information and update the schedule. else{ my $sql = "select max(Number) from Volunteer where Date =? and Volu +nteer =?"; my $number = $dbh->selectcol_arrayfef($sql, $date, "TBD"); my $id = "Date = '$date' and Volunteer = 'TBD' and Number = $number +"; my $content = "Volunteer"; my $status = "$name"; my $sth=$dbh->do(qq {'UPDATE Volunteer SET content=?,status=? WHERE + id=?'}); my $rv=$sth-> execute($content, $status, $id);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: can't locte object method
by lestrrat (Deacon) on Jan 15, 2002 at 09:10 UTC | |
|
Re: can't locte object method
by Biker (Priest) on Jan 15, 2002 at 13:38 UTC |