Disambiguate column. Props voxpelli. fixes #7073

git-svn-id: http://svn.automattic.com/wordpress/trunk@8185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-06-24 17:49:24 +00:00
parent ad61789fa1
commit f8cc400a40

View File

@ -928,7 +928,7 @@ class WP_Query {
$page_paths = '/' . trim($q['pagename'], '/');
$q['pagename'] = sanitize_title(basename($page_paths));
$q['name'] = $q['pagename'];
$where .= " AND (ID = '$reqpage')";
$where .= " AND ($wpdb->posts.ID = '$reqpage')";
$reqpage_obj = get_page($reqpage);
if ( 'attachment' == $reqpage_obj->post_type ) {
$this->is_attachment = true;