Dodgy Hax
Friday, September 28th, 2007I 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 [...]