[RSS Feed/News] Is there a way to use Union with the finder?

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
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:

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...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom