From ed6c69983fac0f9f3e46b3b35107fc1f0387f75f Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 3 Nov 2007 19:00:33 +0000 Subject: [PATCH] Disambiguate columns. Props lawrence123. fixes #5256 git-svn-id: https://develop.svn.wordpress.org/trunk@6310 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index fd7b686953..48d25ab7ce 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -868,12 +868,12 @@ class WP_Query { // If a post number is specified, load that post if ( $q['p'] ) - $where = ' AND ID = ' . $q['p']; + $where = " AND {$wpdb->posts}.ID = " . $q['p']; if ( $q['page_id'] ) { if ( ('page' != get_option('show_on_front') ) || ( $q['page_id'] != get_option('page_for_posts') ) ) { $q['p'] = $q['page_id']; - $where = ' AND ID = ' . $q['page_id']; + $where = " AND {$wpdb->posts}.ID = " . $q['page_id']; } }