Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #39358, comment 7


Ignore:
Timestamp:
12/22/2016 12:39:01 AM (8 years ago)
Author:
dd32
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #39358, comment 7

    v1 v2  
    1111For reference, this is what the SQL ends up looking like:
    1212{{{
    13 SELECT SQL_CALC_FOUND_ROWS wp_developsrc_posts.id
    14 FROM   wp_developsrc_posts
    15        LEFT JOIN wp_developsrc_postmeta AS sq1
    16               ON ( wp_developsrc_posts.id = sq1.post_id
     13SELECT SQL_CALC_FOUND_ROWS wp_posts.id
     14FROM   wp_posts
     15       LEFT JOIN wp_postmeta AS sq1
     16              ON ( wp_posts.id = sq1.post_id
    1717                   AND sq1.meta_key = '_wp_attached_file' )
    1818WHERE  1 = 1
    19        AND (( ( wp_developsrc_posts.post_title LIKE '%08W0zJv.jpg%' )
    20                OR ( wp_developsrc_posts.post_excerpt LIKE '%08W0zJv.jpg%' )
    21                OR ( wp_developsrc_posts.post_content LIKE '%08W0zJv.jpg%' )
     19       AND (( ( wp_posts.post_title LIKE '%08W0zJv.jpg%' )
     20               OR ( wp_posts.post_excerpt LIKE '%08W0zJv.jpg%' )
     21               OR ( wp_posts.post_content LIKE '%08W0zJv.jpg%' )
    2222               OR ( sq1.meta_value LIKE '%08W0zJv.jpg%' ) ))
    23        AND wp_developsrc_posts.post_type = 'attachment'
    24        AND (( wp_developsrc_posts.post_status = 'inherit'
    25                OR wp_developsrc_posts.post_status = 'private' ))
    26 GROUP  BY wp_developsrc_posts.id
    27 ORDER  BY wp_developsrc_posts.post_title LIKE '%08W0zJv.jpg%' DESC,
    28           wp_developsrc_posts.post_date DESC
    29 LIMIT  0, 10
     23       AND wp_posts.post_type = 'attachment'
     24       AND (( wp_posts.post_status = 'inherit'
     25               OR wp_posts.post_status = 'private' ))
     26GROUP  BY wp_posts.id
     27ORDER  BY wp_posts.post_title LIKE '%08W0zJv.jpg%' DESC,
     28          wp_posts.post_date DESC
     29LIMIT  0, 10  
    3030}}}