Make WordPress Core


Ignore:
Timestamp:
11/03/2007 07:00:33 PM (17 years ago)
Author:
ryan
Message:

Disambiguate columns. Props lawrence123. fixes #5256

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r6245 r6310  
    869869        // If a post number is specified, load that post
    870870        if ( $q['p'] )
    871             $where = ' AND ID = ' . $q['p'];
     871            $where = " AND {$wpdb->posts}.ID = " . $q['p'];
    872872
    873873        if ( $q['page_id'] ) {
    874874            if  ( ('page' != get_option('show_on_front') ) || ( $q['page_id'] != get_option('page_for_posts') ) ) {
    875875                $q['p'] = $q['page_id'];
    876                 $where = ' AND ID = ' . $q['page_id'];
     876                $where = " AND {$wpdb->posts}.ID = " . $q['page_id'];
    877877            }
    878878        }
Note: See TracChangeset for help on using the changeset viewer.