Would something like this help? Just use those commands and adapt.
$dbh = DBI->connect( "dbi:mysql:user", "webserver", "pwd") or dienice(
+"Can't connect: ",$dbh->errstr);
my $sub = param("sub");
my $add = param("add");
if($add){
$sth = $dbh->do("update database set count=count+$add where address
+=\"$whatever\"")
}
if($sub){
$sth = $dbh->do("update database set count=count-$sub where address
+=\"$whatever\"")
}
Feel free to update this or correct this as this is the way I do things and if there is a better way or something that I am missing please do let me know.
LeGo