HOME > PHP > PHP Forum > Warning: mssql_query() [function.mssql-query]: message: An expression of non-boolean type specified in a context where a condition is expected, near ')'. (severity 15)
Warning: mssql_query() [function.mssql-query]: message: An expression of non-boolean type specified in a context where a condition is expected, near ')'. (severity 15)
$sqlcheck = "select I.USERID,I.CHECKTIME,CONVERT(CHAR(8), I.CHECKTIME, 114) AS TimeIN,CONVERT(CHAR(8), O.CHECKTIME, 114) AS TimeOUTS
from (select USERID,CHECKTIME,CONVERT(CHAR(8), CHECKTIME, 114) AS TimeIN from View_Person_Bydate where CHECKTYPE='I' and CONVERT(CHAR(10), CHECKTIME, 23)) I left join (select USERID,CHECKTIME,CONVERT(CHAR(8), CHECKTIME, 114) AS TimeOUTS from View_Person_Bydate where CHECKTYPE='O' and CONVERT(CHAR(10), CHECKTIME, 23)) O on I.UserID=O.UserID
where userid=(select uersid from userinfo where CardNo='".$_POST["citizen_id"]."')
and CONVERT(CHAR(10), CHECKTIME, 23) between '".$_POST["date5"]."' and '".$_POST["date6"]."' order by CHECKTIME asc";
Warning: mssql_query() [function.mssql-query]: message: Incorrect syntax near the keyword 'and'. (severity 15) in C:\AppServ\www\fingerweb\Finger\checktimework.php on line 189