如何排除“IN”子句中的值?
$Graduates = "45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,73,74,75,76,84,85,86,87,88,89,91,
92,93,94,95,96,98,99,100,101,103,104,105,106,107,108,109,110,111,112,113,114,117,122,123,126,127,131,135,136,137,
138,139,140,142,143,146,156"; //MajorID
$QryFirstNursing = "SELECT *
FROM ".$SemYearSettings->getYearSem($Enroll)."
WHERE ".$SemYearSettings->getYearSem($Enroll).".MajorID IN (".$Graduates.")
AND ".$SemYearSettings->getYearSem($Enroll).".Category = ".$CategoryIDN;
$resultFirstNursing = openQry($QryFirstNursing);
请帮帮我们。感谢
答案 0 :(得分:2)
@Ardit Meti权利。它看起来像这样:
playermovement