mirror of
git://develop.git.wordpress.org/
synced 2025-02-25 00:52:55 +01:00
Disambiguate columns. Props lawrence123. fixes #5256
git-svn-id: https://develop.svn.wordpress.org/trunk@6310 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
be99735638
commit
ed6c69983f
@ -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'];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user