I'm using codeigniter-4.1.9. I have a score table and there have multiple round. each user getting there scores in different rounds. I want to retrieve each users score in a single row with different rounds but unable to get expected result. How to fix this?
I tried both :
$scmodel->query("SELECT DISTINCT * FROM score GROUP BY score");
OR
$scmodel->query("SELECT DISTINCT * FROM score GROUP BY teamid");
expected Result should:
teamid round1 round2 round3
1 20 30 40
2 50 30 90
3 45 38 70
But Getting:
teamid round1 round2 round3
1 20
2 50
3 45
1 30
2 30
3 38
1 40
2 90
3 70
Score Table are
