Created
June 4, 2011 16:01
-
-
Save jamescridland/1008014 to your computer and use it in GitHub Desktop.
Extracting phpBB private messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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