tp5 左连接

db('detainform')->alias('d')->join("information i",'i.z_id=d.z_id','LEFT')->where(['d.z_id'=>$z_id])->find();

你可能感兴趣的:(PHP)