I have 2 tables that need to be searched, I have listed the important tables and fields here:
Table: FAQs
Columns: id, title
Table: FIELD_VALUES
Columns: id, value
So basically the table FAQs holds a question 'title' and the table FIELD_VALUES holds information that can be related to the question in the table FAQs. So 'value' in this case is an answer in HTML format. What I need to do is search the table FAQs for the 'title', and search the table FIELD_VALUES for the 'value'. It should then only return unique question 'title' from the table FAQs.
I have gotten as far as returning the 'title' from FAQs using:
SELECT title FROM FAQs WHERE title LIKE '%".$_REQUEST['term']."%'"
That works ok, but I am guessing I need to do some form of UNION and then a JOIN to return the title?