From f8cc400a40056ae2532bdd09955c244d913887e9 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 24 Jun 2008 17:49:24 +0000 Subject: [PATCH] Disambiguate column. Props voxpelli. fixes #7073 git-svn-id: http://svn.automattic.com/wordpress/trunk@8185 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 8fb273101f..c6f662518a 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -928,7 +928,7 @@ class WP_Query { $page_paths = '/' . trim($q['pagename'], '/'); $q['pagename'] = sanitize_title(basename($page_paths)); $q['name'] = $q['pagename']; - $where .= " AND (ID = '$reqpage')"; + $where .= " AND ($wpdb->posts.ID = '$reqpage')"; $reqpage_obj = get_page($reqpage); if ( 'attachment' == $reqpage_obj->post_type ) { $this->is_attachment = true;