I'm trying to perform a search with the following query:
SELECT
*
FROM
question_index
JOIN
question_content
ON question_index.id = question_content.question_id
WHERE
question_index.remove = '0' AND
question_index.active = '1' AND
question_index.publish_date <= '$current_time' AND
(
question_index.question LIKE '%$keyword%' OR
question_content.text LIKE '%$keyword%'
)
GROUP BY
question_index.id
ORDER BY
question_index.publish_date DESC
What I want to do is for the search to run through both tables and display results that match either "question_index.question" or "question_content.text"
But right now, it's only displaying the results that match "question_content.text". I tried removing "question_content.text LIKE '%$keyword%'" but not results appear at all. The only way I could get results that matches "question_index.question" is if I remove the join all together. But that's not the result I want.