-1
我想用在我的控制器此MySQL查詢,而無需使用查詢()。控制器分頁使用子查詢
SELECT * FROM T1 INNER JOIN
(SELECT T1.id
FROM T1
INNER JOIN T2 ON T1.id = T2.T1_id
INNER JOIN T3 ON T2.T3_id = T3.id
WHERE
1 = 1
GROUP BY T1.id
HAVING COUNT(*) = 1) AS T1_x ON T1.id = T1_x.id
無法弄清楚我的控制器中的代碼是什麼。