Jump to content

Archived

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

ScrollMaster

Using One Table to Select Data From Two Other Tables

Recommended Posts

I have 3 Tables

Posts
Message
User

Posts contains a message id and a user id

In order to grab the data I want do I have to make two seperate queries Post Message, Post User and then use php to match up the data or is it possible with MySQL Statements to Select all the data at once.

I am unsure how to do this.

Share this post


Link to post
Share on other sites
What are the "all data" that you want? Please clarify... in general, you can use JOINs and get back all the related records in a single pass.

Share this post


Link to post
Share on other sites

×

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.