你的数据库支持union么,支持的话可以:select * from table1 as a,table2 as b where a.ID=b.ID and b.checks=0 union select * from table1 as c,table3 as d where c.ID=d.ID and d.checks=0;或则:
select distinct table1.* from table1,table2,table3 where (table1.id=table2.id and table2.checks=0) or (table1.id=table3.id and table3.checks=0);
select distinct table1.* from table1,table2,table3 where (table1.id=table2.id and table2.checks=0) or (table1.id=table3.id and table3.checks=0);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货