attachment Search query
-
Dear sir,
I have get below query, but I cant optimize / cache this query.
Please help me…SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_postmeta AS sq1 ON ( wp_posts.ID = sq1.post_id AND sq1.meta_key = ‘_wp_attached_file’ ) WHERE 1=1 AND (((wp_posts.post_title LIKE ‘%ke%’) OR (wp_posts.post_excerpt LIKE ‘%ke%’) OR (wp_posts.post_content LIKE ‘%ke%’) OR ( sq1.meta_value LIKE ‘%ke%’ ))) AND (wp_posts.post_mime_type LIKE ‘image/%’) AND wp_posts.post_type = ‘attachment’ AND ((wp_posts.post_status = ‘inherit’ OR wp_posts.post_status = ‘private’)) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 40
regards,
Uday
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘attachment Search query’ is closed to new replies.