pool
همکار بازنشسته
- تاریخ عضویت
- 24 می 2006
- نوشتهها
- 3,838
- لایکها
- 10,697
توی فایل forumdisplay.php پیدا کنید:
عوض کنید به:
PHP:
# Include visible IN (0,1,2) in order to hit upon the 4 column index
$threadscount = $db->query_first_slave("
SELECT COUNT(*) AS threads, SUM(IF(thread.lastpost > $lastread AND open <> 10, 1, 0)) AS newthread
$hook_query_fields
FROM " . TABLE_PREFIX . "thread AS thread
$tachyjoin
$hook_query_joins
WHERE forumid = $foruminfo[forumid]
AND sticky = 0
$prefix_filter
$visiblethreads
$globalignore
$limitothers
$datecut
$hook_query_where
");
عوض کنید به:
PHP:
# Include visible IN (0,1,2) in order to hit upon the 4 column index
$threadscount = $db->query_first_slave("
SELECT COUNT(*) AS threads,
(
SELECT COUNT(*) AS newthread
FROM " . TABLE_PREFIX . "thread AS thread
WHERE forumid = $foruminfo[forumid]
AND lastpost > $lastread
AND open <> 10
AND sticky = 0
$prefix_filter
$visiblethreads
$globalignore
$limitothers
$datecut
$hook_query_where
) AS newthread
$hook_query_fields
FROM " . TABLE_PREFIX . "thread AS thread
$tachyjoin
$hook_query_joins
WHERE forumid = $foruminfo[forumid]
AND sticky = 0
$prefix_filter
$visiblethreads
$globalignore
$limitothers
$datecut
$hook_query_where
");