Got me a bit of a problem with a site I'm doing...
I've got 2 tables in a MySQL database:
tbl_Course:
-course_ID
-course_Name
-course_Module1
-course_Module2
-course_Module3
tbl_Modules:
-module_ID
-module_Name
-module_Description
The course_Module[n] fields contains a number which refer to a module_ID in the other table. I need to construct an SQL query which returns the names of the modules for each of the modules in the course.
I know how to do this if there was only 1 module for each course but haven't a clue how to get it to look up 3 different names from the same table.
Any help would be greatly appreciated.
(I'm using PHP & MySQL in Dreamweaver MX2004)
I've got 2 tables in a MySQL database:
tbl_Course:
-course_ID
-course_Name
-course_Module1
-course_Module2
-course_Module3
tbl_Modules:
-module_ID
-module_Name
-module_Description
The course_Module[n] fields contains a number which refer to a module_ID in the other table. I need to construct an SQL query which returns the names of the modules for each of the modules in the course.
I know how to do this if there was only 1 module for each course but haven't a clue how to get it to look up 3 different names from the same table.
Any help would be greatly appreciated.
(I'm using PHP & MySQL in Dreamweaver MX2004)