Make WordPress Core


Ignore:
Timestamp:
05/25/2023 12:53:24 PM (18 months 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-admin/includes/class-wp-list-table.php

    r55293 r55857  
    699699            $months = $wpdb->get_results(
    700700                $wpdb->prepare(
    701                     "
    702                 SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
    703                 FROM $wpdb->posts
    704                 WHERE post_type = %s
    705                 $extra_checks
    706                 ORDER BY post_date DESC
    707             ",
     701                    "SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
     702                    FROM $wpdb->posts
     703                    WHERE post_type = %s
     704                    $extra_checks
     705                    ORDER BY post_date DESC",
    708706                    $post_type
    709707                )
Note: See TracChangeset for help on using the changeset viewer.