6e554108 by Jeff Balicki

qa

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