可以请任何人告诉我如何将这个原始查询转换为Cakephp 2.x
SELECT idUser, email, username,
(select count(room.idRoom) FROM room as room where winner1 = user.idUser or winner2 = user.idUser) as t
FROM
PRODB.user as user
order by t desc
;
答案 0 :(得分:0)
在cakephp中我们必须将原始查询添加为内联..我希望这可能对您有所帮助。
sudo python whatever.py