I don't see how that would help
FWIW I'm trying to give ORDER BY precedence over GROUP BY, and more importantly, not have to do it with multiple queries, temporary tables, and all that extra junk.
Plain-English query: select the greatest datetime from the posts table for each forumid.
Posts table schema:
Code:
mysql> describe posts;
+--------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+------------------+------+-----+---------+----------------+
| id | int(11) unsigned | | PRI | NULL | auto_increment |
| subject | varchar(255) | | | | |
| contents | text | | | | |
| threadid | int(11) | | | 0 | |
| forumid | int(11) | | | 0 | |
| datetime | int(11) | | | 0 | |
| posteruserid | int(11) | | | 0 | |
+--------------+------------------+------+-----+---------+----------------+
7 rows in set (0.00 sec)