From 734492958eaa2f193db304fd5d4cf050390eff1a Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 26 Sep 2006 19:59:41 +0000 Subject: These changes should let olympus scale a little bit better. i haven't adjusted the schemas but added the details to create_schema_files - david is able to build them then in line with his changes. :) git-svn-id: file:///svn/phpbb/trunk@6411 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 1518f1d1e5..50b1a138c4 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -117,15 +117,15 @@ function update_post_information($type, $ids, $return_update_sql = false) { $sql = 'SELECT MAX(post_id) as last_post_id FROM ' . POSTS_TABLE . ' - WHERE post_approved = 1 - AND ' . $db->sql_in_set($type . '_id', $ids); + WHERE ' . $db->sql_in_set($type . '_id', $ids) . ' + AND post_approved = 1'; } else { $sql = 'SELECT ' . $type . '_id, MAX(post_id) as last_post_id FROM ' . POSTS_TABLE . ' - WHERE post_approved = 1 - AND ' . $db->sql_in_set($type . '_id', $ids) . " + WHERE ' . $db->sql_in_set($type . '_id', $ids) . " + AND post_approved = 1 GROUP BY {$type}_id"; } $result = $db->sql_query($sql); -- cgit v1.2.1