Skip to content

Instantly share code, notes, and snippets.

@jamescridland
Created June 4, 2011 16:01
Show Gist options
  • Save jamescridland/1008014 to your computer and use it in GitHub Desktop.
Save jamescridland/1008014 to your computer and use it in GitHub Desktop.
Extracting phpBB private messages
/* 1. Search in discussions_users for user, and remember their ID and email. */
/* Here's the SQL query... */
SELECT username AS from_user, FROM_UNIXTIME(`privmsgs_date`) AS sent, privmsgs_subject, privmsgs_text FROM `discussions_privmsgs` LEFT JOIN discussions_privmsgs_text on privmsgs_id=privmsgs_text_id LEFT JOIN discussions_users ON privmsgs_from_userid=user_id WHERE `privmsgs_to_userid` = 28861
/*... export this as PDF, then send it to user's ID.*/
/* posts are */
SELECT topic_title,post_subject,post_text,post_time FROM `discussions_posts` JOIN discussions_posts_text ON discussions_posts.post_id = discussions_posts_text.post_id JOIN discussions_topics ON discussions_topics.topic_id=discussions_posts.topic_id WHERE `poster_id` = 18852
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment