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

Key Word Search

New Here ,
Aug 09, 2011 Aug 09, 2011

I need a way to search a particular field for "keywords" that may have been entered by a user in a search field.

Example:     Keywords:  phone,cable,contract   OR    Keywords:  phone,cable    OR Keywords:  contract

I'm looking for a way to search for above  keywords within lets say a Description field.  The # of keywords entered is up to the user based on the types things they are looking for.

Any ideas?

Thanks in advance.

Brian

500
Translate
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
Community Beginner ,
Aug 09, 2011 Aug 09, 2011

are you looking for an autocomplete function while using a search engine or to you want to search the posted form data on the server?

Translate
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
New Here ,
Aug 09, 2011 Aug 09, 2011

I just need to search a single field within a table.   Something like:

select * from contract where the keywords entered are within the Description field

Translate
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
Community Beginner ,
Aug 09, 2011 Aug 09, 2011

You need to be explain more. SELECT * FROM indicates that you want to do a SQL query?

e.g

SELECT * FROM dbo,xx

WHERE Description = 'keyword1' OR Description = 'keyword2' ...

Translate
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
LEGEND ,
Aug 09, 2011 Aug 09, 2011
LATEST

select somefields

from sometables

where 1 = 2

<cfloop list="#keywords#" index = "word">

or somefield like '%#word#%'

</cfloop>

Translate
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