I have two queries that I really need to combine into one, preferably in the query itself. Here are the two queries:
$sql = "SELECT C.id,C.content
FROM answers A, question Q, choices C
WHERE A.response_id='$rid'
AND A.question_id=Q.id
AND A.choice_id=C.id
AND C.content NOT LIKE '!other%'
ORDER BY C.id";
$other_sql = "SELECT C.id,A.response
FROM answers_other A, question Q, choices C
WHERE A.response_id='$rid'
AND A.question_id=Q.id
AND A.choice_id=C.id
AND C.content LIKE '!other%'
ORDER BY C.id";
I'm assuming the structures and fields can be seen easily enough by looking at the queries. I would greatly appreciate any possible solutions, as this is a final stumbling block for this particular project. Thanks very much.