I have a page that I output a list of courses from the database.
I'd like to filter off courses that have an entry in another table, but not sure how to write that.
Here is the sql statement i have now
SELECT corid, course_num, ctitle FROM spec_course ORDER BY course_num ASC
and I want it to look in the spec_coursecats table to see if there is an entry for the corid that is in the spec_course table and if it finds one, to exclude that course from being output.
how would that be written?
I'd like to filter off courses that have an entry in another table, but not sure how to write that.
Here is the sql statement i have now
SELECT corid, course_num, ctitle FROM spec_course ORDER BY course_num ASC
and I want it to look in the spec_coursecats table to see if there is an entry for the corid that is in the spec_course table and if it finds one, to exclude that course from being output.
how would that be written?