MyBB Community Forums

Full Version: Post id problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello MyBB Community. Smile

I own a forum which is holding a contest called Rush to 1000 posts.
We are trying to get to the 1000 post mark.
In the contest, whatever member gets the post id 1000 wins
We currently have 855 posts.

The only problem is the latest post id is different then what the board says.
The latest post ID is 786.
This means I have no idea what post is #1000.

How do I get the post id and the forum's post count to be the same?
Or at least find out the correct post number?

Thanks,
-Xarver.
I believe that threads are treated as posts for the total posts thing.
Yes, but the problem is the postids are different then the post count on the board.

Therefore, I can not find out which post is #1000 without the board showing "1083" for example
You could probably find it with an SQL query. Because post IDs are never reused, once one single post is deleted, the number of actual posts in the database will always be less than the most recent post ID.

You might need to do a recount and rebuild though because the post ID should only be equal or higher to what the stats say, not lower, which is what yours is.
How to I find it with a SQL query?
And I can't just count all the posts. :\
No I don't mean you count them all, I mean run the recount and rebuild tools in the ACP. ACP > Tools & Maintenance > Recount & Rebuild. Then the stats will be up to date.

SQL query:

SELECT * FROM `mybb_posts` LIMIT 999, 1
Ok, I recounted the statistics, and it now says 853 instead of 855.

Where do I find/insert that SQL Query?
What does it do?

Thanks.
You run the query in phpMyAdmin, it'll be in your host control panel. It will return the 1000th entry in the post table, which will be the 1000th post made.
Okay. How do I run the query?
Sorry for this, I'm not really a web guy. (I program desktop mostly)
When you're in phpMyAdmin, you should see a list on the left with your database, choose your database, you'll then see a list of tables, click the SQL tab at the top, paste the code in, hit Go.

Are you sure the latest post ID is 786?? I can't see how that's possible if the stats are saying there's 853...
Pages: 1 2