0
Zend_Db_Select에이 쿼리를 가져 오는 데 어디서부터 시작 해야할지 알 수 없습니다. 나는 젠드의 변수 할당 및 하위 쿼리와 함께 일한 적이있다 :Zend_Db_Select 변수 할당 및 하위 쿼리
SELECT
@current_continent := stats_geo_continent.id AS `continent_id`,
(SELECT GROUP_CONCAT(code) from stats_geo_country WHERE stats_geo_country.continent = @current_continent) AS `group`,
stats_geo_country.code
FROM
stats_geo_continent
INNER JOIN
stats_geo_country ON stats_geo_country.continent = stats_geo_continent.id;
필요하지 않은 경우 $ db-> query()를 사용하십시오. 또한 데이터베이스에 뷰를 만들고 모델을 만들 수도 있습니다. Db_select를 사용하는 것보다 빠르고 효율적이라고 생각합니다. – Marcin