1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'XenForo Questions and Support' started by jamalfree, Jan 28, 2016.

  1. jamalfree

    jamalfree Active Member

    i wanna a query to extract all thread have less than 500 words
  2. Chris D

    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.
    jamalfree likes this.
  3. jamalfree

    jamalfree Active Member

    thank you a lot chris for big help..(y)

Share This Page