>>403
Thanks for the additional clarification. I ended up settling for a basic code that needs to be manually adjusted for each new parent thread, but just in case anyone else is interested:
<?php
$con=mysqli_connect("localhost","USER","PASSWORD","TABLENAME");
if (mysqli_connect_errno($con))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result1=mysqli_query($con, "SELECT count(*) as total from comments where parent='1'");
$data1=mysqli_fetch_assoc($result1);
?>
<table>
<tr>
<td>001</td>
<td>
<?php echo $data1['total']; ?>
</td>
</tr>
</table>