• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

<cfsearch> for mutiple fields

New Here ,
Aug 02, 2013 Aug 02, 2013

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

Views

413

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 02, 2013 Aug 02, 2013

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation