Jump to content

Extracting data from one table which is linked to another ??


mikehammond

Recommended Posts

Hello all newbie alert !!!  :D , I'm hoping you guys can help me out with MySql 4.1.19.

For my sins I'm an admin on a phpbb forum and in one section someone managed to delete all the topics & posts.

I have found the tables concerned in a backup database they are phpbb_topics, phpbb_posts and phpbb_posts_text.

The first two (phpbb_topic and phpbb_posts) are easy enough to sort using a field called forum_id which in this case has a value of 39 for all the posts I need to reinsert the data, but the third table (phpbb_posts_text) does not have the forum_id field in it.

phpbb_posts_texts does however share another field with the phpbb_posts table which is post_id (this is a unique reference for each post under a specific topic)

So how do I extract the phpbb_posts_texts data only related to the values in phpbb_posts table for the post_id values that also have forum_id of 39 ?

Many thanks I hope it makes sense ?


Mike :)

PS I use phpMyAdmin
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.