mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-15 21:44:56 +01:00
counting on primary key should be slightly faster...
git-svn-id: file:///svn/phpbb/trunk@5979 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d794557825
commit
2f4c3ea0be
@ -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']}
|
||||
|
Loading…
x
Reference in New Issue
Block a user