summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index f7bfb9a04..75d7f0088 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -693,7 +693,7 @@ function comment_save($edit) {
// Strip the "/" from the end of the parent thread.
$parent->thread = (string) rtrim((string) $parent->thread, '/');
// Get the max value in *this* thread.
- $max = db_result(db_query("SELECT MAX(thread) FROM {comments} WHERE thread LIKE '%s.%%' AND nid = %d", $parent->thread, $edit['nid']));
+ $max = db_query("SELECT MAX(thread) FROM {comments} WHERE thread LIKE :thread AND nid = :nid", array(':thread' => $parent->thread .'%', ':nid' => $edit['nid']))->fetchField();
if ($max == '') {
// First child of this parent.