in reply to Re: Updating a database
in thread Updating a database
... except for grep's reason I *would* use placeholders, so I'd use a slight tweak on dws:$dbh->do("update Volunteer set volunteer_id = $new_id and Number = $ne +wnumber where id = 2") or die $dbh->errstr;
my $sth = $dbh->prepare("UPDATE Volunteer " . "SET Volunteer = ? " . "WHERE Date = ? AND Volunteer = 'TBD' AND Number = ?" ) or die $dbh->errstr; my $rv = $sth->execute($status, $date, $id) or die $dbh->errstr;
|
|---|