Skip to content

Instantly share code, notes, and snippets.

@jonlow
Last active May 31, 2017 02:30
Show Gist options
  • Save jonlow/f877186f229c873777a0aaae7b5264a4 to your computer and use it in GitHub Desktop.
Save jonlow/f877186f229c873777a0aaae7b5264a4 to your computer and use it in GitHub Desktop.
Get authors of the last modified wordpress posts
select wp_postmeta.post_id, meta_value as 'authorid', user_login, post_title, post_type, post_modified, post_date
from wp_postmeta
inner join wp_posts
on wp_posts.ID = post_id
inner join wp_users
on wp_users.ID = meta_value
where meta_key ='_edit_last'
order by post_modified desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment