Changeset 4039

Show
Ignore:
Timestamp:
07/24/06 18:24:56 (2 years ago)
Author:
ryan
Message:

Use AND instead of HAVING. #2604

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/category.php

    r4015 r4039  
    7171    if ( $hide_empty ) { 
    7272        if ( 'link' == $type ) 
    73             $having = 'HAVING link_count > 0'; 
     73            $where .= ' AND link_count > 0'; 
    7474        else 
    75             $having = 'HAVING category_count > 0'; 
     75            $where .= ' AND category_count > 0'; 
    7676    } 
    7777 
     
    8181        $number = ''; 
    8282 
    83     $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories WHERE $where $having ORDER BY $orderby $order $number"); 
     83    $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories WHERE $where ORDER BY $orderby $order $number"); 
    8484 
    8585    if ( empty($categories) )