I'm running Movable Type 3.1.5 running about 5 blogs.
Using SQL, I'd like to get the last entry from each blog.
This is the query I have thus far:
SELECT mt_blog.blog_id, mt_blog.blog_name, mt_blog.blog_site_url, mt_entry.entry_basename, mt_entry.entry_modified_on, mt_entry.entry_title, mt_entry.entry_created_on
FROM mt_blog, mt_entry
WHERE mt_entry.entry_blog_id = mt_blog.blog_id
ORDER BY mt_entry.entry_created_on DESC
LIMIT 0 , 30
This returns:
2 - Mr. Irreverent - Missy Elliott - Road To Failure
4 - Media Chin Check - 40oz_parodies
4 - Media Chin Check - All Write Already
3 - Ya Heard - Rumorville
2 - Mr. Irreverent - Funkmaster Flex: Hide Or Cry Chick
4 - Media Chin Check - Funk Flex Reneges on Peacemaker Role
5- Connect Politic - Lovers & Friends: New HIV Strain
2 - Mr. Irreverent - SOHH What You Saying?
4 - Media Chin-Check - Vibe Hates/Loves Misogyny
3 - Ya Heard - The Black Fat Joe Called It
2 - Mr. Irreverent - Harlemworld Trumped On The Apprentice!
2 - Mr. Irreverent - Kanye West - Stop Sucking Yourself
2 - Mr. Irreverent - Jadakiss - Overated? Or Am I Just Hating
The first column is the BLOG ID. What I'd like it to do is just return the following rows.
2 - Mr. Irreverent - Missy Elliott - Road To Failure
4 - Media Chin Check - 40oz_parodies
3 - Ya Heard - Rumorville
5- Connect Politic - Lovers & Friends: New HIV Strain
SELECT DISTINCT(blog_name), mt_blog.blog_id, mt_blog.blog_site_url, mt_entry.entry_basename, mt_entry.entry_modified_on, mt_entry.entry_title, mt_entry.entry_created_on
FROM mt_blog, mt_entry WHERE mt_entry.entry_blog_id = mt_blog.blog_id ORDER BY mt_entry.entry_created_on DESC
Bookmarks