【发布时间】:2011-03-08 07:51:35
【问题描述】:
有没有什么方法可以使用 symfony 在 Doctrine 中运行这个 sql 查询??
$q = "SELECT a.id as app_id, b.title as gameTitle FROM application a
LEFT JOIN application_translation b on a.id=b.id
LEFT OUTER JOIN (SELECT m.application_id as m_id, count(m.member_id) as total
FROM member_application m GROUP BY m.application_id) x on x.m_id = a.id
WHERE a.is_active=1 AND a.is_mobile = 1
ORDER BY x.total DESC";
更新
感谢您的回复。只有一件事,我怎么能转换
对象(sfOutputEscaperArrayDecorator)#524
到
object(sfOutputEscaperIteratorDecorator)#560
使用您的代码?我认为那是因为 HYDRATE MODE,但我不太清楚。
【问题讨论】: