看这个能不能得到正确的结果
select *
from table1 a
inner join table2 b on a.tx_t1 = b.t_id
left outer join h_art_type c on a.tx_t2 = c.t_id
left outer join h_art_type d on a.tx_t3 = d.t_id
where a.tx_id = '123456'
select *
from table1 a
inner join table2 b on a.tx_t1 = b.t_id
left outer join h_art_type c on a.tx_t2 = c.t_id
left outer join h_art_type d on a.tx_t3 = d.t_id
where a.tx_id = '123456'
所以把a b顺序换个位置就可以了
SELECT *
FROM `table2` b,`table1` a
left outer join `h_art_type` c on c.`t_id`=a.`tx_t2`
left outer join `h_art_type` d on d.`t_id`=a.`tx_t3`
where a.tx_id='123456' and a.`tx_t1`=b.`t_id`