my $sth =$dbh ->prepare("UPDATE products set pname=? and unit=? and qty=? and cost=? WHERE id = ?"); $sth->execute($pname, $unit, $qty, $cost, $id);