Hi,
I have the following SQL code:
SELECT * FROM module_blog_entries
LEFT JOIN module_blog_blogs ON module_blog_entries.blogID=module_blog_blogs.ID
GROUP BY module_blog_entries.blogID
ORDER BY module_blog_entries.tstamp DESC
LIMIT 20
Unfortunately, it appears to be grouping before ordering. In other words, it's bundling all the entries in the same blog together before sorting them, so I'm getting returned the oldest (and hence lowest tstamped) entries from each blog, ordered by the entries in the blog with the newest first entry.
I would do a bit of PHP trickery, but then I wouldn't necessarily get 20 entries.
This can't be so hard!!!
Any ideas?
ucbones