6e554108 by Jeff Balicki

qa

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent a66a7dfa
......@@ -135,17 +135,8 @@ function update_tax_counts()
mysqli_query($conn, "UPDATE ".$table_prefix."term_taxonomy SET count = '$count' WHERE term_taxonomy_id = '$term_taxonomy_id'");
}
$result = mysqli_query($conn, "SELECT ID FROM ".$table_prefix."posts");
while ($row = mysqli_fetch_array($result)) {
$post_id = $row['ID'];
echo "post_id: ".$post_id." count = ";
$countresult = mysqli_query($conn, "SELECT count(*) FROM ".$table_prefix."comments WHERE comment_post_ID = '$post_id' AND comment_approved = 1");
$countarray = mysqli_fetch_array($countresult);
$count = $countarray[0];
echo $count."<br>";
mysqli_query("UPDATE ".$table_prefix."posts SET comment_count = '$count' WHERE ID = '$post_id'");
}
}
}
......
......@@ -2,5 +2,5 @@
Theme Name: MSF CA Child
Author: Tenzing Communications
Template: msf-ca
Version: 1.0.5
Version: 1.0.6
*/
\ No newline at end of file
......