I am now having a problem sorting the data in my PHP page where the data displayed is combined of two tables as the both tables are linked by a foreign key in one of the table.
two tables are as below
Table name: Students
stu_id
stu_name
.
.
.
stu_course_id
Table name: courses
course_id
course_name
Wen displaying the data it is displayed in following format:
Student id | Student name | student course
—-1 ————–john————-engineering
—-2————–dave—————business
I am able to sort the data by name which is pretty easy but I am having difficulty sorting the data by course name. Is this possible as the course name is not in the same table as student?
1 Answer