WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #10964, comment 97


Ignore:
Timestamp:
08/17/11 08:07:02 (4 years ago)
Author:
JediSthlm
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10964, comment 97

    v1 v2  
    22 
    33Update: well, I now get 504 Gateway Time-out instead. So it did not work that well, hmm 
     4 
     5Update 2: Here is one of the query that seem to be the problem, I think the problem is related to the  
     6AND meta_value IN ('Distillery','Bottling')  
     7 
     8SELECT  wp_posts.* FROM wp_posts  JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) WHERE 1=1  AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') AND wp_posts.ID IN ( 
     9                                SELECT post_id 
     10                                FROM wp_postmeta 
     11                                WHERE meta_key = 'bottler' 
     12                                AND meta_value IN ('Distillery','Bottling') 
     13                                GROUP BY post_id 
     14                                HAVING COUNT(*) >= 2 
     15                        ) GROUP BY wp_posts.ID HAVING COUNT(*) = 1 ORDER BY wp_posts.post_date DESC LIMIT 40, 10