anchor.diff:  
   			 //states_categories_total
   
  -			sqlpre = "SELECT * FROM states_categories_total WHERE state = '" + state + "'";
  +			sqlpre = "SELECT * FROM states_categories_total WHERE state = '" + state + "'" + "AND cid = " + cid;
   			rs = stmt.executeQuery(sqlpre);
   
   			if (rs.isBeforeFirst())
  
positive.code: 			 //users_categories_total
  
  
  			sqlpre = "SELECT * FROM users_categories_total WHERE uid = " + uid;
  			rs = stmt.executeQuery(sqlpre);
  
  			if (rs.isBeforeFirst())
  
negative.code: 			
  			//users_products_total
  
  			sqlpre =  "SELECT * FROM users_products_total WHERE uid = " + uid + "AND pid = " + pid;
  			rs = stmt.executeQuery(sqlpre);
  			
  			if (rs.isBeforeFirst())
  				sql = "UPDATE users_products_total SET total = total + " + total + "WHERE uid = " + uid + "AND pid = " + pid;
  			else
  