我想將其轉換爲Doctrine2。如何將SQL查詢轉換爲Doctrine2?
類似這些問題:
Symfony2/Doctrine2 - How to convert this SQL request with QueryBuilder?
How to convert a complex MySQL Query to Doctrine2
Convert SQL to Doctrine 2 Query Builder or DQL by using NOT IN?
這可能嗎?
SELECT
SUM(q.amount)
FROM(
SELECT amount
FROM expense_report e0_
WHERE
(e0_.is_account_transfer = 0)
AND (e0_.remove_date IS NULL)
LIMIT 0, 2) q
感謝
(通過幫助和改進評審隊列) - 改進標題,增加對類似問題的參考 – 2015-03-13 17:44:33
Hi @ user783029,您對我的解決方案有何看法? – Matteo 2015-03-18 10:56:34