WordPress.org

Make WordPress Core

Ticket #38062: query.p1

File query.p1, 821 bytes (added by yscrappy, 4 years ago)

Simple change to query to make it SQL Compliant

Line 
1*** /tmp/class-wp-query.php     Wed Sep 14 19:00:25 2016
2--- ./wp-includes/class-wp-query.php    Wed Sep 14 19:00:48 2016
3***************
4*** 2807,2813 ****
5                        if ( $split_the_query ) {
6                                // First get the IDs and then fill in the objects
7 
8!                               $this->request = "SELECT $found_rows $distinct {$this->db->posts}.ID FROM {$this->db->posts} $join WHERE 1=1 $where $groupby $orderby $limits";
9 
10                                /**
11                                 * Filters the Post IDs SQL request before sending.
12--- 2807,2813 ----
13                        if ( $split_the_query ) {
14                                // First get the IDs and then fill in the objects
15 
16!                               $this->request = "SELECT $found_rows $distinct {$this->db->posts}.ID, {$this->db->posts}.post_date FROM {$this->db->posts} $join WHERE 1=1 $where $groupby $orderby $limits";
17 
18                                /**
19                                 * Filters the Post IDs SQL request before sending.