我有點困惑在這裏需要一些幫助......如何INNER JOIN超過兩個類別?
的情況是我做了三個表(fr_Leagues,fr_nations和fr_confeds),我想要做的就是添加一個聯賽足見類別的名稱不是帶分頁的id。這裏是代碼:
現在固定!
"SELECT
a.id as confed_id,
a.fr_short_name as confed_name,
b.id as nation_id,
b.fr_name as nation_name,
c.id as league_id,
c.fr_name as league_name"
." FROM fr_confeds as a
INNER JOIN fr_nations as b ON a.id = b.confed_id
INNER JOIN fr_leagues as c ON b.id = c.nation_id"
." LIMIT $paginate->start, $paginate->limit"
你可以發表你的表格架構嗎? – 2012-01-28 06:56:44