mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-07 09:49:04 +00:00
Rewrite WP_User_Query to use JOIN instead of subquery. See #14572
git-svn-id: https://develop.svn.wordpress.org/trunk@15579 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4244,10 +4244,9 @@ function _wp_search_sql($string, $cols) {
|
||||
*
|
||||
* @param array $queries An array of queries
|
||||
* @param string $meta_id_column The column that holds the object id
|
||||
* @param string $table Which meta table to look in
|
||||
* @return string
|
||||
*/
|
||||
function _wp_meta_sql( $queries, $meta_id_column, $table ) {
|
||||
function _wp_meta_sql( $queries, $meta_id_column ) {
|
||||
global $wpdb;
|
||||
|
||||
$clauses = array();
|
||||
@@ -4278,9 +4277,7 @@ function _wp_meta_sql( $queries, $meta_id_column, $table ) {
|
||||
return '';
|
||||
|
||||
return "
|
||||
SELECT $meta_id_column
|
||||
FROM $table
|
||||
WHERE CASE meta_key
|
||||
AND CASE meta_key
|
||||
" . implode( "\n", $clauses ) . "
|
||||
END
|
||||
GROUP BY $meta_id_column
|
||||
|
||||
Reference in New Issue
Block a user