Dodgy Hax
I recently upgraded to WP 2.3, and an old hack I’d done came back to bite me in the arse. What I had was:
$link_cats = $wpdb->get_results(”
SELECT
Distinct
C.cat_id,
C.cat_name
FROM
$wpdb->link2cat As L2C
JOIN
$wpdb->categories As C
On C.cat_id = L2C.category_id
WHERE
C.cat_id <> (category id was here)
“);
But link2cat has been removed. I replaced this, after a bit of hunting, with the (much more sensible):
$link_cats = get_categories(array(“type” => “link”, “exclude” => “(category id was here)”));
This worked fine, but in the following foreach over the results I found where i had $link_cat->cat_id I now needed $link_cat->cat_ID