"; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo "
"; echo "
"; echo " ".$myrow['TopicSubject']; echo "
"; echo " Created at ".date("H:i ",strtotime($myrow['TopicCreated']))."
".date("d-m-y ",strtotime($myrow['TopicCreated']))." by ".$myrow['TopicCreatorName']; echo "
"; //get the number of comments for this topic $result2 = mysql_query("SELECT count(commentid) as counts from comment where topicid=".$myrow['TopicID']." and (approved='y' or (authenticated='y' and DATE_ADD( commentcreated, INTERVAL ".$HoursTillCommentIsValid." HOUR ) > NOW() ) )",$db); //echo ("SELECT count(commentid) as counts from comment where topicid=".$myrow['TopicID']." and ( approved='y' or DATEDIFF ( HOUR , datecreated , GetDate() ) < 2)"); $totalComments=mysql_result($result2,0,"counts"); if($totalComments=="") $totalComments=0; echo " Total $totalComments comments"; echo "

"; } ?>