From 96db0093812dddbf617b54adf73464d2f8d28bc5 Mon Sep 17 00:00:00 2001 From: rboren Date: Tue, 27 Jul 2004 14:58:30 +0000 Subject: [PATCH] Quote $id in get_the_category() db query. Patch from MCincubus for bug 0000191. git-svn-id: http://svn.automattic.com/wordpress/trunk@1486 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions-category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/template-functions-category.php b/wp-includes/template-functions-category.php index 7105690344..acd0de94c8 100644 --- a/wp-includes/template-functions-category.php +++ b/wp-includes/template-functions-category.php @@ -13,7 +13,7 @@ function get_the_category($id = false) { $categories = $wpdb->get_results(" SELECT category_id, cat_name, category_nicename, category_description, category_parent FROM $wpdb->categories, $wpdb->post2cat - WHERE $wpdb->post2cat.category_id = cat_ID AND $wpdb->post2cat.post_id = $id + WHERE $wpdb->post2cat.category_id = cat_ID AND $wpdb->post2cat.post_id = '$id' "); return $categories;