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

XF 1.3 How to find 500,000th post?

Discussion in 'XenForo Questions and Support' started by jakew009, Jul 21, 2014.

  1. jakew009

    jakew009 Member

    I am trying to find the 500,000th post on our forum to award the member a prize.

    We know roughly the day that we passed this milestone (last Saturday, around 7PM)

    I have tried the following SQL

    SELECT * FROM xf_post WHERE message_state = 'visible'  ORDER BY post_date LIMIT 1 OFFSET 499999;
    But it doesn't come up with what I would expect (this post is about 10 days out / early).

    What am I missing?
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. jakew009

    jakew009 Member

  4. Brogan

    Brogan XenForo Moderator Staff Member

    It's still the 500,000th post.

    What happens if you award it to the member who has made the currently visible 500k post and then a post is deleted?
    That post is no longer the correct post.
  5. jakew009

    jakew009 Member

    Yes of course that could happen, but members only have 24 hours to delete their posts so it's unlikely to happen now :)

    I don't understand why the 500,000th record in the database is not the 500,000th post (if you exclude the 'non visible' posts?
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Hard deleted posts, merged posts, etc.

Share This Page