Home  >  Article  >  Backend Development  >  thinkphp关联查询有关问题,join

thinkphp关联查询有关问题,join

WBOY
WBOYOriginal
2016-06-13 12:35:52709browse

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,怎么做

thinkphp 关联查询
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn