From 72135edb2b0024dfe96709a04d9342ba1852aeea Mon Sep 17 00:00:00 2001 From: saxmatt Date: Mon, 12 Jan 2004 09:35:41 +0000 Subject: [PATCH] Fix from TheJason for duplicate entries when cats are specified. git-svn-id: http://svn.automattic.com/wordpress/trunk@756 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-blog-header.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-blog-header.php b/wp-blog-header.php index 8811053629..d9b1ca414f 100644 --- a/wp-blog-header.php +++ b/wp-blog-header.php @@ -304,6 +304,7 @@ if (isset($user_ID) && ('' != intval($user_ID))) $where .= " OR post_author = $user_ID AND post_status != 'draft')"; else $where .= ')'; +$where .= " GROUP BY $tableposts.ID"; $request = " SELECT $distinct * FROM $tableposts $join WHERE 1=1".$where." ORDER BY post_$orderby $limits";