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

Using Contain in Query Return

Community Beginner ,
Jul 04, 2012 Jul 04, 2012

Copy link to clipboard

Copied

I have a databse table the contains questions (1 fireld) for the user to answer.  I also have table with  words and word definitions ( 2 fields).  I want the questions to feed into the page and I want to some how check the question for the words in the definition table and if that word is contained in the word definition  table that it create that word as a link.  Is this possible?

TOPICS
Database access

Views

908

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
LEGEND ,
Jul 04, 2012 Jul 04, 2012

Copy link to clipboard

Copied

It's probably possible but your post is unclear.  If the question was, "What is the airspeed velocity of an unladen swallow?", what do you want to happen?

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
Community Beginner ,
Jul 04, 2012 Jul 04, 2012

Copy link to clipboard

Copied

I want it to search that questions to see if a word in the questions is in the word definition table and if it is make that word a link.  So if "airspeed" is in the word definition table it would search question and see the airspeed is htere and make just that word a link.

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
LEGEND ,
Jul 04, 2012 Jul 04, 2012

Copy link to clipboard

Copied

LATEST

Something like this:

select word, definition

from word_defintion

where word in (<cfqueryparam value="#yourquestion#" list ="yes" separator = " ">)

should get you started.  You'll probably have to do something about capital letters.

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