Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #57767, comment 5


Ignore:
Timestamp:
02/21/2023 02:26:49 AM (12 months ago)
Author:
kuroro111
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #57767, comment 5

    initial v1  
    22{{{
    33SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID
    4                                         FROM wp_posts  LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )  LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id )  LEFT JOIN wp_postmeta AS mt2 ON ( wp_posts.ID = mt2.post_id AND mt2.meta_key = 'プラン' )
     4                                        FROM wp_posts  LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )  LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id AND mt1.meta_key = 'プラン' )
    55                                        WHERE 1=1  AND (
    66  wp_postmeta.meta_key = 'プラン'
    7   AND
    8   (
    9     mt1.meta_key = 'プラン'
    10     OR
    11     mt2.post_id IS NULL
    12   )
     7  OR
     8  mt1.post_id IS NULL
    139) AND ((wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled'
    1410OR wp_posts.post_status = 'private')))
    1511                                        GROUP BY wp_posts.ID
    16                                         ORDER BY wp_postmeta.meta_value DESC, wp_posts.post_date DESC
     12                                        ORDER BY CAST(wp_postmeta.meta_value AS CHAR) DESC, CAST(mt1.meta_value AS CHAR) DESC, wp_posts.post_date DESC
    1713                                        LIMIT 0, 10
     14                               
    1815}}}