anchor.diff:  			 if (rs.isBeforeFirst())
   			 	sql = "UPDATE products_total SET total = total + " + total  + "WHERE  pid = " + pid;
   			 else
  -			 	sql = "INSERT INTO products_total VALUES (" + pid + ", " + total + ")";
  +			 	sql = "INSERT INTO products_total (name, pid, total) VALUES ('" + name + "', " +  pid + ", " + total + ")";
   
   				stmt.executeUpdate(sql);
   				
  
positive.code: 			if (rs.isBeforeFirst())
  				sql = "UPDATE users_categories_total SET total = total + " + total  + "WHERE  uid = " + uid  + "AND cid = " + cid;
  			else
  				sql = "INSERT INTO users_categories_total VALUES (" +  uid + ", " + username + ", " +  cid + ", " + total + ")";
  
  				stmt.executeUpdate(sql);
  				
  
negative.code: 		 if (rs.isBeforeFirst())
  		 	sql = "UPDATE states_total SET total = total + " + grandtotal + " WHERE  state = " + state;
  		 else
  		 	sql = "INSERT INTO states_total (state, total) VALUES ('" + state + "', " + grandtotal + ")";
  
  			stmt.executeUpdate(sql);
  		
  