目前,我在下面所做的代碼是僅顯示分配有tutor_id的課程的代碼。然而,我想要的是顯示沒有分配tutor_id的課程以及「沒有導師已被分配到本課程」。 Tutor_id是數據庫中的一個NULL變量。如何顯示帶/不帶空值的所有變量?
$arrItems = executeSelectQuery("SELECT * FROM course, category, tutor WHERE course.Category_id = category.Category_id AND course.Tutor_id = tutor.Tutor_id");
$totalDesign = executeSelectQuery("SELECT * FROM course, category, tutor WHERE course.Category_id = category.Category_id AND course.Tutor_id = tutor.Tutor_id");
$numrows = count($totalDesign);
$arrItems = executeSelectQuery("SELECT * FROM course, category, tutor WHERE course.Category_id = category.Category_id AND course.Tutor_id = tutor.Tutor_id ORDER BY course.Course_name ASC LIMIT $offset, $rowsPerPage");
絕對適合我,謝謝:) – AmySunshines