Help for this page

Select Code to Download


  1. or download this
    my $sql = "UPDATE tablename SET bandwidth = bandwidth + ? WHERE user =
    + ?";
    my $sth = $dbh->prepare($sql);
    my $sth->execute($newtraffic,$user);
    
  2. or download this
    my @user_fields = split /:/,$_;
    $user_fields[2] = $user_fields[2] + $newtraffic; 
    my $newline = $user_fields[0].':'.$user_fields[1].':'.$user_fields[2];