Simpler solution #47280#2829
Conversation
mukeshpanchal27
left a comment
There was a problem hiding this comment.
The PR looks good to me. I have added some minor reviews on PR.
| {$this->sql_clauses['groupby']} | ||
| {$this->sql_clauses['orderby']} |
There was a problem hiding this comment.
For count value from the quer,y i don't think we need groupby and orderby. Is there any use case in which we need these clauses?
| {$this->sql_clauses['groupby']} | ||
| {$this->sql_clauses['orderby']} |
There was a problem hiding this comment.
Please check above review comment
| if ( ! $q['no_found_rows'] && ! empty( $limits ) ) { | ||
| $found_rows = 'SQL_CALC_FOUND_ROWS'; | ||
| } | ||
|
|
There was a problem hiding this comment.
There is one empty line that needs to remove.
| $found_request = "SELECT COUNT(*) | ||
| {$this->query_from} | ||
| {$this->query_where} | ||
| {$this->query_orderby} |
There was a problem hiding this comment.
Check my first review comment
| {$this->sql_clauses['groupby']} | ||
| {$this->sql_clauses['orderby']} |
There was a problem hiding this comment.
Check my first review comment.
| $groupby | ||
| $orderby |
There was a problem hiding this comment.
Check my first review comment.
| $groupby | ||
| $orderby |
There was a problem hiding this comment.
Check my first review comment.
| @@ -728,7 +737,7 @@ private function set_found_sites() { | |||
| * @param string $found_sites_query SQL query. Default 'SELECT FOUND_ROWS()'. | |||
There was a problem hiding this comment.
Needs to update docblock regarding new update
| @@ -826,7 +827,7 @@ public function query() { | |||
| * @param string $sql The SELECT FOUND_ROWS() query for the current WP_User_Query. | |||
There was a problem hiding this comment.
Needs to update docblock regarding new update


Trac ticket: https://core.trac.wordpress.org/ticket/47280
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.