madness69 Posted October 17, 2012 Share Posted October 17, 2012 Hello everybody, hope having some help, i have 2 tables called "camp" and "users" : camp - id - id_owner - camp_title - camp_info users - id - username - password - email Each camp is related to a user, thats why in table camp there is the "id_owner". Could someone tell me the Sql Query to get the email by the camp table since im working in the Edit camp page and i need to get the email that is related whit the camp owner. Best regards Quote Link to comment https://forums.phpfreaks.com/topic/269572-geting-a-email-from-related-tables/ Share on other sites More sharing options...
trq Posted October 17, 2012 Share Posted October 17, 2012 SELECT c.camp_title, c.camp_info, u.email FROM camp c LEFT JOIN users u ON (u.id = c.id_owner Quote Link to comment https://forums.phpfreaks.com/topic/269572-geting-a-email-from-related-tables/#findComment-1385748 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.