I have a MySQL db table with the following:
section_id | category_id | post_date | content
What I want to do is grab the latest content (the lastest one entered) in each category_id from a specific section_id, which may or may not have multiple category_id s.
I think SELECT content FROM my_table WHERE section_id=$id ORDER BY post_date DESC LIMIT 1; would give me the latest entry for that section, but how to I specify i want all the categories' last entry?
Would this be best/faster handled by MySQL or load up all the one that match section_id and let PHP sort through the array?
I'm stumped.