【发布时间】:2019-11-08 07:43:52
【问题描述】:
我有这个代码
$q = $conn->query("SELECT facultydetails.F_NAME,Paper_title from faculty inner join facultydetails on faculty.Fac_ID = facultydetails.Fac_ID where (paper_path = 'NULL' OR paper_path = '') and (certificate_path = 'NULL' OR certificate_path = '') and (report_path = 'NULL' OR report_path = '') " );
现在我需要添加一个条件,用户将提供 id 并且只有应该选择与 id 相关的东西才能使用此代码
$q = $conn->query("SELECT facultydetails.F_NAME,Paper_title from faculty where facultydetails.Fac_ID='$FacID' inner join facultydetails on faculty.Fac_ID = facultydetails.Fac_ID where (paper_path = 'NULL' OR paper_path = '') and (certificate_path = 'NULL' OR certificate_path = '') and (report_path = 'NULL' OR report_path = '') " );
在 php 中工作
【问题讨论】:
-
我希望这对你有用。 stackoverflow.com/questions/10133356/…