Make WordPress Core

Changeset 5247


Ignore:
Timestamp:
04/12/2007 02:08:40 AM (17 years ago)
Author:
rob1n
Message:

Use get_var and only select cat_ID. see #4040

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/wordpress.php

    r5246 r5247  
    294294                $post_cats = array();
    295295                foreach ($categories as $category) {
    296                     $cat_ID = (int) $wpdb->get_results("SELECT * FROM $wpdb->categories WHERE cat_name = '$category'");
     296                    $cat_ID = (int) $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE cat_name = '$category'");
    297297                    if ($cat_ID == 0) {
    298298                        if ($cat_ID = wp_insert_category(array('cat_name' => $category))) {
Note: See TracChangeset for help on using the changeset viewer.