Changeset 30003 for trunk/src/wp-includes/comment.php
- Timestamp:
- 10/24/2014 02:33:46 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r29965 r30003 222 222 */ 223 223 class WP_Comment_Query { 224 /** 225 * SQL for database query. 226 * 227 * @since 4.0.1 228 * @access public 229 * @var string 230 */ 231 public $request; 232 224 233 /** 225 234 * Metadata query container … … 579 588 $groupby = 'GROUP BY ' . $groupby; 580 589 } 581 $query = "SELECT $fields FROM $wpdb->comments $join WHERE $where $groupby ORDER BY $orderby $order $limits"; 590 591 $this->request = "SELECT $fields FROM $wpdb->comments $join WHERE $where $groupby $orderby $order $limits"; 582 592 583 593 if ( $this->query_vars['count'] ) { 584 return $wpdb->get_var( $ query);594 return $wpdb->get_var( $this->request ); 585 595 } 586 596 587 597 if ( 'ids' == $this->query_vars['fields'] ) { 588 $this->comments = $wpdb->get_col( $ query);598 $this->comments = $wpdb->get_col( $this->request ); 589 599 return array_map( 'intval', $this->comments ); 590 600 } 591 601 592 $results = $wpdb->get_results( $ query);602 $results = $wpdb->get_results( $this->request ); 593 603 /** 594 604 * Filter the comment query results.
Note: See TracChangeset
for help on using the changeset viewer.