Changeset 3192 for trunk/wp-admin/upgrade-functions.php
- Timestamp:
- 11/22/2005 03:40:32 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upgrade-functions.php
r3183 r3192 303 303 304 304 // populate comment_count field of posts table 305 $comments = $wpdb->get_results( "SELECT comment_post_ID, COUNT(*) as c FROM $wpdb->comments GROUP BY comment_post_ID" );305 $comments = $wpdb->get_results( "SELECT comment_post_ID, COUNT(*) as c FROM $wpdb->comments WHERE comment_approved = '1' GROUP BY comment_post_ID" ); 306 306 if( is_array( $comments ) ) { 307 307 foreach ($comments as $comment) {
Note: See TracChangeset
for help on using the changeset viewer.