SELECT COUNT(a.aircraft) as total
, a.aircraft
, b.fullname AS aircraft_name
FROM db_pireps AS a
JOIN db_aircraft AS b ON a.aircraft = b.id
WHERE pilotid = {$pilotid}
GROUP BY aircraft
ORDER BY total DESC
LIMIT 6
我有這個查詢,但我想增加b.registration AS reg
,但我的嘗試似乎失敗了,因爲我不知道如何將另一個SELECT放在該查詢中。添加另一個選擇
你正在得到什麼錯誤? – DevelopmentIsMyPassion 2013-02-26 17:22:12
您可以顯示出現錯誤的查詢嗎? – Barmar 2013-02-26 17:22:16