Skip to main content
Known Participant
July 4, 2012
Question

Using Contain in Query Return

  • July 4, 2012
  • 1 reply
  • 1006 views

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?

This topic has been closed for replies.

1 reply

Inspiring
July 4, 2012

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?

Known Participant
July 4, 2012

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.

Inspiring
July 4, 2012

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.