Why does this code fail to display the category name "Apples" using the current WordPress taxonomy system? The Category names are stored in the $wpdb->terms table (wp_terms).
<?php
$ra_category_id = 3;
$ra_category = $wpdb->get_results("SELECT name FROM $wpdb->terms WHERE term_id = '3'");
$ra_category_name = $ra_category->name;
?>
<h3>Category: <?php echo $ra_category_name; ?></h3>
The table rows are
term_id name slug term_group
1 Uncategorized uncategorized 0
2 Blogroll blogroll 0
3 Apples apples 0
4 Bananas bananas 0