你的代码可以简化成这样?那明显后面不对啊
select * FROM
(SELECT * FROM {billindex} a) h JOIN
(SELECT * FROM (SELECT * FROM {BuyBill} m INNER JOIN {ptype} n ON n.typeId =m.PtypeId) t
后面应该还要写 如 on h.xxx = t.yyy