0 Replies Latest reply on Dec 7, 2006 4:23 PM by TommyMTL

    Evaluate what is different

    TommyMTL
      Need to evaluate waht is different and display it from 2 lists

      <!-- ORIGINAL LIST BEFORE UPDATE -->
      <cfset PreList = "MATA,PITA,PMON">
      <cfset PreListEval = QueryNew("Unic_ID")/>

      <cfloop list="#PreList#" index="i">
      <cfscript>
      newRow = QueryAddRow(PreListEval);
      newColumn = QuerySetCell(PreListEval,"Unic_ID",i);
      </cfscript>
      </cfloop>

      <cfquery name="PreLISTOrder" dbtype="query">
      SELECT Unic_ID
      FROM PreListEval
      ORDER BY Unic_ID ASC
      </cfquery>


      <!-- LISTE AFTER UPDATE -->
      <cfset PostList = "MATA,PITA,PMON,VMON,GGGG">
      <cfset PostListEval = QueryNew("Unic_ID")/>

      <cfloop list="#PostList#" index="i">
      <cfscript>
      newRow = QueryAddRow(PostListEval);
      newColumn = QuerySetCell(PostListEval,"Unic_ID",i);
      </cfscript>
      </cfloop>

      <cfquery name="POSTLISTOrder" dbtype="query">
      SELECT Unic_ID
      FROM PostListEval
      ORDER BY Unic_ID ASC
      </cfquery>

      <!-- Display Query -->
      <cfdump var="#PreListEval#"/>
      <cfdump var="#PostListEval#"/>

      -- What should I use to display only what is different between both lists?