total threads from main page: 2681
https://www.thinktankforums.com/thread.php?thread_id=2688
i was going to make a thread link randomizer and i saw that the number differs from the total. is this a known behavior? is the post total dynamically calculated each page load?
lucas@www:~$ cat sql.php
<?php
$id_start = 1;
$id_end = 2690;
echo <<<ABC
CREATE TABLE `enum` (
`id` INT NOT NULL ,
PRIMARY KEY ( `id` )
);
INSERT INTO `enum` ( `id` ) VALUES
ABC;
for ($i=$id_start; $i<=$id_end; $i++) {
echo ($i===$id_start) ? "($i)" : ", ($i)";
};
echo <<<ABC
;
SELECT `enum`.`id`
FROM `enum`
LEFT JOIN `ttf_thread`
ON `ttf_thread`.`thread_id`=`enum`.`id`
WHERE `ttf_thread`.`thread_id` IS NULL;
DROP TABLE `enum`;
ABC;
lucas@www:~$ php sql.php > go.sql
lucas@www:~$ mysql -p thinktankforums-com < go.sql > results.txt
Enter password:
lucas@www:~$ cat results.txt
id
20
31
156
399
622
623
624
1965
lucas@www:~$
maybe they were duplicates or tests or something weird. no idea
I know the post/thread totals are only calculated when a successful post/thread is added. Going into mysql and removing posts/threads doesn't reset the post/thread count.
yeah, that's the best explanation.. they were probably manual deletions followed by a lack of considerate housekeeping