Posted by _ck_ on Wed 22 Jul 18:30
report abuse | download | new post
- $groupby = 'GROUP BY ' . $groupby;
- $orderby = 'ORDER BY ' . $orderby;
- $found_rows = '';
- // if ( !empty($limits) )
- // $found_rows = 'SQL_CALC_FOUND_ROWS';
- // $request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits";
- $request = " SELECT $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits";
- $this->request = apply_filters('posts_request', $request);
- $this->posts = $wpdb->get_results($this->request);
- // Raw results filter. Prior to status checks.
- $this->posts = apply_filters('posts_results', $this->posts);
- $cjoin = apply_filters('comment_feed_join', '');
- $cwhere = apply_filters('comment_feed_where', "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'");
- $comments_request = "SELECT $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere ORDER BY comment_date_gmt DESC LIMIT " . get_option('posts_per_rss');
- $this->comments = $wpdb->get_results($comments_request);
- }
- // $found_posts_query = apply_filters( 'found_posts_query', 'SELECT FOUND_ROWS()' );
- $found_posts_query = " SELECT count($count) FROM $wpdb->posts $join WHERE 1=1 $where $groupby";
- $this->found_posts = $wpdb->get_var( $found_posts_query );
- $this->found_posts = apply_filters( 'found_posts', $this->found_posts );
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.