Please help me :)
May 6, 2018
7
Level 1
Database tables values assign as a table header in the dataTables
How can I make table values from database to be my table header in my dataTables?
So here's the thing, supposedly I have this database:
ID studenID student_name subject grades
-----------------------------------------------------------------------------------------
1 1 student1 Math 90
2 1 student2 English 90
3 1 student3 Science 96
4 2 student1 Math 92
5 2 student2 English 93
6 2 student3 Science 95
And my datatables, what I am imagining is something like this:
ID student_name Math English Science
------------------------------------------------------------------------------------
1 student1 90 90 96
2 student2 92 93 95
Level 20
Is the subject constant or not ? If yes, just put them in your code.
If you have to retrieve them, you can use a groupby subject and foreach the result.
Please or to participate in this conversation.