Troche główkowałem i mam pytanie, jak w Zendzie utworzyć takie proste zapytanie:
SELECT * FROM wp_posts t1, wp_term_relationships t2, wp_term_taxonomy t3 WHERE t1.ID = t2.object_id AND t2.term_taxonomy_id = t3.term_taxonomy_id AND t1.post_type = 'post' AND t1.post_status = 'publish' AND (t3.term_id = 53 OR t3.term_id = 92) ORDER BY t1.ID DESC
Próbowałem cos takiego, ale niezabardzo chce działać:
$select = $this->select(); $select ->where('t1.post_type = ? ','post') ->where('t1.post_status = ? ','publish') // ->where('t1.ID = t2.object_id') // ->where('t2.term_taxonomy_id = t3.term_taxonomy_id') ->where('t3.term_id = ?',$pos) ->orWhere('t3.term_id = ?',$reg) ->order('t1.ID DESC');
Bardzo proszę o pomoc