parent childs example apply on one to many relationship
parent childs example apply on one to many relationship
I applied the parent childs example on my tables (colleges and depts) and it is work fine, the tables schema is as follow:
-Table "colleges"
--Fields: id, college_name
-Table "depts"
--Fields: id, dept_name, college_id
But the problem with the above schema is the duplication in the "depts" table, so I would like to change the schema to stop duplication in that table as follow
-Table "colleges"
--Fields: id, college_name
-Table "depts"
--Fields: id, dept_name
-Table "college_dept"
--Fields: college_id, dept_id
Then apply it on the parent childs example as here
https://datatables.net/blog/2019-01-11
Need your help and thanks
Replies
It sounds like a left join is the way to go here. Then have a separate page or DataTable for the departments.
Allan
Thanks Allan
I will try it