sql查询语句 --------一个表中的字段对应另外一个表中的两个字段的查询语句

例子:

一表中的price_start_station_id  and  price_end_station_id  和二表中的  station_id 对应

 pdo_fetchall('select 其他字段,b.station_name as station_name1,c.station_name  as station_name2 from '.tablename('goupiao_price').' a
left join '.tablename('goupiao_station').'b on  a.price_start_station_id =b.station_id 
left join '.tablename('goupiao_station').'c on 
or a.price_end_station_id=c.station_id ');
原文地址:https://www.cnblogs.com/qjyking/p/5541425.html