Fix ambiguous column error. See #12891

git-svn-id: http://svn.automattic.com/wordpress/trunk@16423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-11-17 12:33:32 +00:00
parent e5f944a913
commit a0e5b38765
1 changed files with 2 additions and 2 deletions

View File

@ -613,11 +613,11 @@ function _transform_terms( &$terms, $taxonomies, $field, $resulting_field ) {
case 'name': case 'name':
$terms = "'" . implode( "','", array_map( 'sanitize_title_for_query', $terms ) ) . "'"; $terms = "'" . implode( "','", array_map( 'sanitize_title_for_query', $terms ) ) . "'";
$terms = $wpdb->get_col( " $terms = $wpdb->get_col( "
SELECT $resulting_field SELECT $wpdb->term_taxonomy.$resulting_field
FROM $wpdb->term_taxonomy FROM $wpdb->term_taxonomy
INNER JOIN $wpdb->terms USING (term_id) INNER JOIN $wpdb->terms USING (term_id)
WHERE taxonomy IN ($taxonomies) WHERE taxonomy IN ($taxonomies)
AND $field IN ($terms) AND $wpdb->terms.$field IN ($terms)
" ); " );
break; break;