1 Reply Latest reply on Aug 2, 2013 8:16 PM by p.sim

    <cfsearch> for mutiple fields

    newcf Level 1

      How can search for mutiple fields (criterias)? my code below returns nothing?

       

       

      Form.cfm:

      <form action="search.cfm" method="post">

      Name:<input type="text" name="name" />

      Desc:<input type="text" name="desc" />

      <input type="submit" name="submit" value="Search" />

      </form>

       

      search.cfm

      <cfset searchTerm = "#form.name#,#form.desc#">

       

      <cfsearch name="searchResults" collection="mycollection" criteria="#searchTerm#">


        <cfdump var="#searchResults#">

       

      thanks