Hi I need write this sql with Zend_Db_Select, but I dont know how I can write subqueries. I would appreciate any help. Thanks.
SELECT * FROM advert WHERE categoryId
IN (
SELECT id
FROM `tree`
WHERE `lft` BETWEEN
(SELECT lft FROM tree WHERE id = '2') AND
(SELECT rgt FROM tree WHERE id = '2'))