I'm trying to write a MySQL query for a database that displays pictures. Each picture is in a category and the record includes the date that the record was added to the database. In addition to having links which display the categories, I'd like to have one that displays the most recent image in each category. That way, people can see if there's anything new since the last time they looked at the whole category. (I'm also ordering the category by date, descending, so the most recent image is displayed first.)
I can't seem to figure out the syntax for the query to find the most recent in each category, though. I could do a query for each category, but that seems excessive.
JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
I can't seem to figure out the syntax for the query to find the most recent in each category, though. I could do a query for each category, but that seems excessive.
JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.