fix comment count

title."
"; $result2=db_result(db_query("select nid from node where title='%s'",$row->title)); echo $result2."
"; $write = array('nid'=>$result2,'totalcount'=>$row->totalcount,'daycount'=>$row->daycount); drupal_write_record('node_counter',$write,'nid'); } /* $result = db_query("select nid from forum where tid=200 AND nid>5180"); while ($row = db_fetch_object($result)) { $result2 = db_query("select * from comments where nid=%d order by timestamp desc",$row->nid); $count = 0; $timestamp = 0; $uid=0; while ($row2=db_fetch_object($result2)) { $count++; if ($row2->timestamp > $timestamp) { $timestamp = $row2->timestamp; $uid = $row2->uid; } } echo $timestamp."
"; echo $uid."
"; echo $count."
"; db_query("update node_comment_statistics set comment_count=%d where nid=%d",$count,$row->nid); $write = array('nid'=>$row->nid,'last_comment_timestamp'=>$timestamp,'last_comment_name'=>null,'last_comment_uid'=>$uid,'comment_count'=>$count); //drupal_write_record('node_comment_statistics',$write); }*/ ?>