? sites/default/settings.php
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.560
diff -u -p -r1.560 comment.module
--- modules/comment/comment.module	1 Jul 2007 23:15:41 -0000	1.560
+++ modules/comment/comment.module	2 Jul 2007 03:05:19 -0000
@@ -982,7 +982,8 @@ function comment_render($node, $cid = 0)
         $query .= ' AND c.status = %d';
         $query_args[] = COMMENT_PUBLISHED;
       }
-
+      
+      $query = db_rewrite_sql($query, 'c', 'cid');
       $result = db_query($query, $query_args);
 
       if ($comment = db_fetch_object($result)) {
@@ -1028,6 +1029,8 @@ function comment_render($node, $cid = 0)
           $query .= ' ORDER BY SUBSTRING(c.thread, 1, (LENGTH(c.thread) - 1))';
         }
       }
+      $query = db_rewrite_sql($query, 'c', 'cid');
+      $query_count = db_rewrite_sql($query_count, 'c', 'cid');
 
       // Start a form, for use with comment control.
       $result = pager_query($query, $comments_per_page, 0, $query_count, $query_args);
@@ -2208,4 +2211,4 @@ function comment_unpublish_by_keyword_ac
       break;
     }
   }
-}
\ No newline at end of file
+}
