如果把这件mysqlserver语句改写成在php 上用mysql语句
where a.contactid = c.contactid and b.deptid = c.deptid and c.isdisplay=1 and c.deptid in(select deptid from tab_EnterpriseDept_temp a where a.memo =(select memo from tab_EnterpriseDept_temp where deptid="&deptid&") or a.memo like(select memo+'/%' from tab_EnterpriseDept_temp where deptid="&deptid&"))谢谢帮忙!!!

解决方案 »

  1.   

    where a.contactid = c.contactid and b.deptid = c.deptid and c.isdisplay=1 and c.deptid in(select deptid from tab_EnterpriseDept_temp a where a.memo =(select memo from tab_EnterpriseDept_temp where deptid="&deptid&") or a.memo like(select  concat(memo,'/%') from tab_EnterpriseDept_temp where deptid="&deptid&"))
      

  2.   

    where a.contactid = c.contactid and b.deptid = c.deptid and c.isdisplay=1 and c.deptid in(select deptid from tab_EnterpriseDept_temp a where a.memo =(select memo from tab_EnterpriseDept_temp where deptid="&deptid&") or a.memo like(select  concat(memo,'/%') from tab_EnterpriseDept_temp where deptid="&deptid&"))一楼正解。