$trend=""; my $qtrend = $dbh->quote($trend); my $qticker = $dbh->quote($ticker); $sth_2 = $dbh->prepare("UPDATE options SET trend=$qtrend WHERE ticker = $qticker"); $sth_2->execute();