Current:
| Process | Skill |
|---|---|
| Process A | Skill_1 |
| Process A | Skill_2 |
| Process A | Skill_3 |
| Process B | Skill_1 |
| Process B | Skill_2 |
Expected Result:
| Process | Skill |
|---|---|
| Process A | Skill_1, Skill_2, Skill_3 |
| Process B | Skill_1, Skill_2 |
Sample SQL:
SELECT p.pid,
p.process,
p.product_id,
p.sr_id,
sr.pid,
sr.process_id,
sr.skill_req,
sr.availability
FROM p
JOIN sr
ON p.pid= sr.pid
WHERE p.product_id= '20'
Need help how to rearrange my one to many relationship table. Tried using array "$array= array($row['skill_req']) " but does not recognize the skill_req variable.