Changeset 6310

Show
Ignore:
Timestamp:
11/03/07 19:00:33 (1 year ago)
Author:
ryan
Message:

Disambiguate columns. Props lawrence123. fixes #5256

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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        }