SELECT dev03posts.ID FROM dev03posts
JOIN (
SELECT rel.object_id id, count(rel.term_taxonomy_id) all_cat ,
SUM(CASE WHEN term.slug IN ('magazin', 'arbeitgeber') THEN 1 ELSE 0 END) AS count_specific
FROM dev03term_relationships rel
JOIN dev03term_taxonomy taxo ON rel.term_taxonomy_id = taxo.term_taxonomy_id
AND taxo.taxonomy = 'category'
JOIN dev03terms term on term.term_id = taxo.term_id
GROUP BY rel.object_id
) as temp ON temp.id = dev03posts.ID AND all_cat != count_specific WHERE ( (post_title LIKE '%%' OR post_content LIKE '%%' OR post_excerpt LIKE '%%' ) AND post_type = 'post') OR (post_type = 'page' AND dev03posts.ID IN (SELECT child.id AS 'ID' FROM dev03posts parent INNER JOIN dev03posts child ON parent.id=child.post_parent AND child.post_type='page' AND child.post_status='publish' AND (child.post_title LIKE '%%' OR child.post_content LIKE '%%' OR child.post_excerpt LIKE '%%' ) WHERE parent.post_status = 'publish' AND parent.post_type = 'page')) AND post_status='publish'
Mit dem kürzlich veröffentlichten Koalitionsvertrag legt die neue Bundesregierung, bestehend aus CDU, CSU und SPD, ein umfangreiches Reformpaket für das Sozialwesen vor. Der Vertrag plant strukturelle Veränderungen in nahezu allen Bereichen des ...Mit dem kürzlich veröffentlichten Koalitionsvertrag legt die neue Bundesregierung, bestehend aus CDU, CSU und SPD, ein umfangreiches Reformpaket ...