I have a problem with my mysql query.
My database:
sections id section_name grades id user_id section_id date grade
I want my data
SELECT grades.*,sections.* FROM grades inner join sections on grades.sections_id = sections.id where grades.user_id = '.$id.' GROUP BY grades.section_id ORDER BY grades.date DESC
you can use this it is working 100%