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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.