Disambiguate columns. Props lawrence123. fixes #5256
git-svn-id: http://svn.automattic.com/wordpress/trunk@6310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3d04ae4f29
commit
a2e0f3352f
|
@ -868,12 +868,12 @@ class WP_Query {
|
||||||
|
|
||||||
// If a post number is specified, load that post
|
// If a post number is specified, load that post
|
||||||
if ( $q['p'] )
|
if ( $q['p'] )
|
||||||
$where = ' AND ID = ' . $q['p'];
|
$where = " AND {$wpdb->posts}.ID = " . $q['p'];
|
||||||
|
|
||||||
if ( $q['page_id'] ) {
|
if ( $q['page_id'] ) {
|
||||||
if ( ('page' != get_option('show_on_front') ) || ( $q['page_id'] != get_option('page_for_posts') ) ) {
|
if ( ('page' != get_option('show_on_front') ) || ( $q['page_id'] != get_option('page_for_posts') ) ) {
|
||||||
$q['p'] = $q['page_id'];
|
$q['p'] = $q['page_id'];
|
||||||
$where = ' AND ID = ' . $q['page_id'];
|
$where = " AND {$wpdb->posts}.ID = " . $q['page_id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue