[thelist] mysql: max in joins?

Beam sbeam at syxyz.net
Tue Mar 4 17:13:01 CST 2003

On Tuesday 04 March 2003 05:36 pm, Emma Jane Hogbin wrote:
> On Tue, Mar 04, 2003 at 04:37:14PM -0500, Beam wrote:
> > how about "max(meta_comments.created)"?
> D'uh! That'd do it, thanks. :) *rolls eyes at self* Any other comments on
> whether or not I should put the last_comment_id into the articles table
> would still be appreciated.
I would ;) Definitely will be faster to left join on primary key (the comments
id) than your JOIN...GROUP BY if you get lots of articles, and/or comments.

More information about the thelist mailing list