Make WordPress Core


Ignore:
Timestamp:
11/28/2005 09:44:56 AM (20 years ago)
Author:
matt
Message:

No need to do those big fancy joins.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r3219 r3220  
    12781278        $post_ids = implode(',', $post_ids);
    12791279
    1280     $dogs = $wpdb->get_results("SELECT DISTINCT
    1281     post_id, cat_ID FROM $wpdb->categories, $wpdb->post2cat
    1282     WHERE category_id = cat_ID AND post_id IN ($post_ids)");
     1280    $dogs = $wpdb->get_results("SELECT post_id, category_id FROM $wpdb->post2cat WHERE post_id IN ($post_ids)");
    12831281
    12841282    if ( empty($dogs) )
     
    12861284       
    12871285    foreach ($dogs as $catt)
    1288         $category_cache[$catt->post_id][$catt->cat_ID] = &get_category($catt->cat_ID);
     1286        $category_cache[$catt->post_id][$catt->category_id] = &get_category($catt->category_id);
    12891287}
    12901288
Note: See TracChangeset for help on using the changeset viewer.