nie no nie ma, ten cały fragment co usunąłes generował tyle zapytan
w index.php
znajdx
Kod:
//
// Start output of page
//
wcześniej dodaj
Kod:
$sql = "SELECT COUNT(t.topic_id) AS topics, t.forum_id, COUNT(p.post_id) AS posts
FROM . (" TOPICS_TABLE . " t LEFT JOIN " . POSTS_TABLE . " p ON t.topic_id=p.topic_id)
WHERE t.topic_staff=1
GROUP BY t.forum_id
ORDER BY t.forum_id";
$topic_staff = array();
while( $row = $db->sql_fetchrow($result) )
{
$topic_staff[ $row['forum_id'] ]['topics'] = $row['topics'];
$topic_staff[ $row['forum_id'] ]['posts'] = $row['posts'];
}
znajdx
Kod:
$posts = $forum_data[$j]['forum_posts'];
wcześniej dodaj
Kod:
if ($userdata['user_level'] != ADMIN && $userdata['user_level'] != MOD)
{
$forum_data[$j]['forum_topics'] -= $topic_staff[ $forum_data[$j]['forum_id'] ]['topics'];
$forum_data[$j]['forum_posts'] -= $topic_staff[ $forum_data[$j]['forum_id'] ]['posts'];
}
}
wszystko powinno byc dobrze, ale jak cos to pisz
AIFM [1%] - kiedyś powstanie