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
If I understand correctly:
SELECT grades.*,sections.* FROM grades INNER JOIN sections ON sections.id = grades.section_id WHERE user_id=$id ORDER BY grades.date DESC LIMIT 1