WordPress.org

Make WordPress Core

Changeset 4155


Ignore:
Timestamp:
09/01/2006 06:50:58 PM (12 years ago)
Author:
ryan
Message:

Resolve table ambiguity.Props filosofo. fixes #3091

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r4144 r4155  
    483483        preg_match('#FROM\s(.*)\sORDER BY#siU', $wp_query->request, $matches);
    484484        $fromwhere = $matches[1];
    485         $numposts = $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere");
     485        $numposts = $wpdb->get_var("SELECT COUNT(DISTINCT $wpdb->posts.ID) FROM $fromwhere");
    486486        $max_num_pages = ceil($numposts / $posts_per);
    487487    } else {
Note: See TracChangeset for help on using the changeset viewer.