I have a query that I would like to use a union statement in to grab the number of replies to a specific thread. The initial topic thread is in a different table, which I am grabbing in the initial query... I would prefer to do this in the single query, however I supposed I could do a separate loops and grab the number of replies with a totally distinct query
Code:
SELECT id,title,category,message FROM forum UNION(SELECT count(msg_id) FROM forum_discussion WHERE msg_id=id) WHERE status!='Closed'
Comment