Making WordPress.org

Changeset 12265


Ignore:
Timestamp:
11/22/2022 11:22:05 AM (2 years ago)
Author:
amieiro
Message:

Translate: Make an SQL optimization in the translation stats.

Props: akirk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/cli/class-stats.php

    r12264 r12265  
    434434
    435435            $first_id = $wpdb->get_var( $wpdb->prepare(
    436                 "SELECT MIN(id) FROM {$wpdb->gp_translations} WHERE date_added >= %s",
    437                 $year . '-01-01'
     436                "SELECT MIN(id) FROM {$wpdb->gp_translations} WHERE date_added BETWEEN %s AND %s",
     437                $year . '-01-01 00:00:00',
     438                $year . '-01-02 00:00:00',
    438439            ) );
    439440
Note: See TracChangeset for help on using the changeset viewer.