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 sections.section_name, grades.grade FROM grades, sections WHERE sections.id = grades.section_id AND grades.user_id = '.$id.' ORDER BY grades.date DESC LIMIT 1
try this?