From dec1d3aa8615386cd62cbcab0a1bc448ab0ad709 Mon Sep 17 00:00:00 2001 From: Alex King Date: Mon, 5 Jan 2004 03:06:21 +0000 Subject: [PATCH] added single quotes around post id in query git-svn-id: https://develop.svn.wordpress.org/trunk@719 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-comments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-comments.php b/wp-comments.php index 4fbbaa32cd..b04178d8a9 100644 --- a/wp-comments.php +++ b/wp-comments.php @@ -14,7 +14,7 @@ $comment_author_email = (isset($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash]) : ''; $comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) : ''; - $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date"); + $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = '$id' AND comment_approved = '1' ORDER BY comment_date"); ?>