Make WordPress Core


Ignore:
Timestamp:
05/25/2023 12:53:24 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Improve formatting of some SQL queries for better readability.

This corrects the placement of double quotes around the query and makes sure the alignment is consistent.

Props umeshmcakadi, mukesh27, krupalpanchal, dhrumilk, SergeyBiryukov.
Fixes #58372.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-tax-query.php

    r55732 r55857  
    467467                        $where = $wpdb->prepare(
    468468                                "$operator (
    469                                 SELECT 1
    470                                 FROM $wpdb->term_relationships
    471                                 INNER JOIN $wpdb->term_taxonomy
    472                                 ON $wpdb->term_taxonomy.term_taxonomy_id = $wpdb->term_relationships.term_taxonomy_id
    473                                 WHERE $wpdb->term_taxonomy.taxonomy = %s
    474                                 AND $wpdb->term_relationships.object_id = $this->primary_table.$this->primary_id_column
    475                         )",
     469                                        SELECT 1
     470                                        FROM $wpdb->term_relationships
     471                                        INNER JOIN $wpdb->term_taxonomy
     472                                        ON $wpdb->term_taxonomy.term_taxonomy_id = $wpdb->term_relationships.term_taxonomy_id
     473                                        WHERE $wpdb->term_taxonomy.taxonomy = %s
     474                                        AND $wpdb->term_relationships.object_id = $this->primary_table.$this->primary_id_column
     475                                )",
    476476                                $clause['taxonomy']
    477477                        );
Note: See TracChangeset for help on using the changeset viewer.