0

我有一个名为 ms_message 的数据库表:有 6 列(id、senderid、receiverid、content、isRead、receivedTime)。我想通过 Doctrine 中的发件人获取最新收到的消息组,但我无法运行子查询或使用 order by 和 group by。

SQL 中的查询如下所示:

SELECT * FROM (SELECT * FROM ms_message WHERE receiverId = :receiver ORDER BY receivedTime) GROUP BY senderId;
4

1 回答 1

0

我不认为 Doctrine 支持像这样的查询SELECT * FROM (SELECT ...)

于 2012-10-31T13:29:45.610 回答