Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Did it work if only single criteria?
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7b7e.html