elvis.hernandez
Member
I want to retrieve a list of threads using an Union in the query. Is there a way to translate this query to the finder?
	
	
	
		
				
			
		Code:
	
	SELECT * FROM (
    (
        SELECT xt.*
        FROM xf_thread xt
        WHERE xt.node_id = 100
        ORDER BY xt.last_post_date DESC LIMIT 20
    )
    union
    (
        SELECT xt.*
        FROM xf_thread xt
        INNER JOIN xf_slinking xs ON xs.thread_id = xt.thread_id
        WHERE xs.node_id = 100
        ORDER BY xt.last_post_date DESC LIMIT 20
    )
) U ORDER BY last_post_date DESC LIMIT 20;