I have several tables holding category info for levels, locations, subjects linked by tables tlevel, tlocation, tsubject and a tutors table linked by foreign keys.
I am using query in the following concept (not actual code) SELECT Name, Level, Subject, Location, Subject FROM levels,tlevel,locations,tlocation,subjects, tsubject WHERE...cond(levelsID)=cond(tlevelID) AND ...cond(subjectID)=cond(tsubjectID)...etc
I have rows returned with several duplicated names, levels,subject and locations.
Eg. tutor AAA
can teach Level1, Level2...
can teachSubject1,Subject2...
at Location1, Location2, Location3 and Location4
current display :
AAA,Level1,Subject1,Location1
AAA,Level2,Subject1,Location1
AAA.Level1,Subject2,Location1
I need to display after fetching rows in PHP
AAA
Levels: Level1, Level2
Subject:Location1, Location2....
Thus, comparing the return cols for duplicates and print once.
Grateful for your time in considering the above. Thks!