I have this table
CREATE TABLE `codes` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`language_id` int(11) unsigned NOT NULL,
`title` varchar(60) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`time_posted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8
language_id refers to what language the record is in. What I would like to do is retrieve a list of the five most recent (ORDER BY time_posted DESC LIMIT 5) records in each language_id. I could do this in a loop within PHP with a number of different SQL queries but I feel there is a simpler way.
I've got to get a book on SQL, haha.
Thanks.