my $sql = "UPDATE tablename SET bandwidth = bandwidth + ? WHERE user = ?"; my $sth = $dbh->prepare($sql); my $sth->execute($newtraffic,$user);