Heim >Backend-Entwicklung >PHP-Tutorial > thinkphp关联查询有关问题,join
thinkphp关联查询问题,join
$result = $room->join('r_hospital on r_department.hospital_id=r_hospital.id')->where(array('hospital_id'=>array('exp','is not null')))->select();
大神们看看,where(array('hospital_id'=>array('exp','is not null')))这句话是什么意思?结果显示出来所有的医院,但我只想查某一个,把医院id等于$data,怎么做