有谁知道这个查询发生了什么?我想要做的是如果表courseID
中不存在表中,则打印所有退出。但我不断收到错误操作数应包含 1 列elective_modules
group_elective_modules
group_elective_modules
这是我的查询
$alternativeEQuery =
"SELECT elective_modules.courseID,elective_modules.yr
FROM elective_modules
WHERE elective_modules.yr = '$year1'
AND elective_modules.courseID
NOT IN
(SELECT group_elective_modules.moduleID,group_elective_modules.courseName
FROM group_elective_modules
WHERE group_elective_modules.courseName = '$courseTitle'
AND elective_modules.courseID = group_elective_modules.moduleID)";
$alternativeEResult = mysql_query($alternativeEQuery) or die($alternativeEQuery."<br/><br/>".mysql_error());