SELECT SQL_CALC_FOUND_ROWS v57cu_posts.ID FROM v57cu_posts LEFT JOIN v57cu_postmeta ON (v57cu_posts.ID = v57cu_postmeta.post_id AND v57cu_postmeta.meta_key = 'featured_post' ) LEFT JOIN v57cu_postmeta AS mt1 ON ( v57cu_posts.ID = mt1.post_id ) WHERE 1=1 AND ( v57cu_postmeta.post_id IS NULL OR ( ( mt1.meta_key = 'featured_post' AND mt1.meta_value = '1' ) OR ( mt1.meta_key = 'featured_post' AND mt1.meta_value = '0' ) ) ) AND v57cu_posts.post_type = 'post' AND ((v57cu_posts.post_status = 'publish')) GROUP BY v57cu_posts.ID ORDER BY v57cu_posts.menu_order, v57cu_postmeta.meta_value DESC, v57cu_posts.post_date DESC LIMIT 198, 6

Nowości wydawnicze