XF 1.4 i wanna a query to extarct all thread have less then 500 words

Chris D

XenForo developer
Staff member
Would be easier to do it based on character count, and I assume you mean threads where the first post is less than 500 words?

It would be something like:
SELECT thread.thread_id, thread.title, post.message
FROM xf_thread AS thread
INNER JOIN xf_post AS post ON
    (thread.first_post_id = post.post_id)
WHERE CHAR_LENGTH(post.message) < 2500
Where 2500 is the character count.