Jump to content

Select Statement - Two Tables


ljmyers

Recommended Posts

My apologies if the answer to this is here somewhere. I have searched for days and tried writing it 500 different ways trying to figure this out but cannot get it to work just as i want it. I have two tables, prefix_users and prefix_recipes. I need for the statement to look at and compare the id (user's id) from table prefix_users with the user_id and id (recipe's id) from the table prefix_recipes and if they are the same, show the recipe's name on the page. It is the user's profile page that I am trying to include the recipes that the user has submitted on their specific page. Any help would be great.

 

table: prefix_users

id (user's id)

 

table: prefix_recipes

id (recipe's id)

user_id

name (recipe's name)

 

Smiles,

Lana

Link to comment
https://forums.phpfreaks.com/topic/145909-select-statement-two-tables/
Share on other sites

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.