XF 2.2 Can this query to find all threads with a tag be written to use the finder without an entity change?

HJW

Active member
Hello,

I'm sure this is a silly question but I'm trying to learn the finder fucntion.

I've got the query below to find all the threads that have a tag that the user is following a thread of. Is it a simple case of being able to re-write this to use the finder or will more development be needed?

SQL:
SELECT DISTINCT title, t.thread_id, reply_count, last_post_date, last_post_id, last_post_username FROM xf_thread_watch as w, xf_tag_content as tc, xf_tag_content as tc2, xf_thread as t
where t.discussion_open = 1
and w.user_id = @@userid
and tc.content_id = w.thread_id
and tc2.content_id = t.thread_id
and tc.tag_id = tc2.tag_id
and t.discussion_state = 'visible'

thanks
order by t.last_post_date DESC
 
Top Bottom