2 Replies Latest reply on Nov 10, 2006 11:57 AM by cluksha

    Comparing values within a cfloop

    cluksha
      Why Can I not loop over a query and and compare it's values to another variable?

      Or better asked HOW CAN I?

      I want to loop over the query and compare the field value to a form value and find a match.

      Why I am I not simpy doing this in the query itself? Take a look at This post

      I hope someone can give me some answers. My loop looks like this...

      <cfloop query="#rsGetCustomers#" >
      <cfscript>
      phone = REReplaceNoCase(#cst_Phone#,"[,.-()]", "", "ALL" );
      if (phone EQ REReplaceNoCase("#attributes.telephone#","[,.-()]", "", "ALL" ))
      tempID = #rsGetCustomers.cst_ID#;
      </cfscript>
      </cfloop>

      THanks all,
      Chris