aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-05-28 16:06:58 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-05-28 16:06:58 +0000
commit2f4c3ea0bea3c698b0fab5fdaf13ec6843af7acd (patch)
treedac92a8fc63d0a69d23f45a7decc09435a7a73a2 /phpBB/viewtopic.php
parentd794557825dd9f28acf241ccf77444ee42dfa049 (diff)
downloadforums-2f4c3ea0bea3c698b0fab5fdaf13ec6843af7acd.tar
forums-2f4c3ea0bea3c698b0fab5fdaf13ec6843af7acd.tar.gz
forums-2f4c3ea0bea3c698b0fab5fdaf13ec6843af7acd.tar.bz2
forums-2f4c3ea0bea3c698b0fab5fdaf13ec6843af7acd.tar.xz
forums-2f4c3ea0bea3c698b0fab5fdaf13ec6843af7acd.zip
counting on primary key should be slightly faster...
git-svn-id: file:///svn/phpbb/trunk@5979 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index a4d22d3caa..6793866c9f 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -239,7 +239,7 @@ if (!($topic_data = $db->sql_fetchrow($result)))
// This is for determining where we are (page)
if ($post_id)
{
- $sql = "SELECT COUNT(*) AS prev_posts
+ $sql = "SELECT COUNT(p.post_id) AS prev_posts
FROM " . POSTS_TABLE . " p
WHERE p.post_approved = 1
AND p.topic_id = {$topic_data['topic_id']}