ratcateme Posted September 5, 2008 Share Posted September 5, 2008 i have two tables one with logins and a file called domain_id domain_id corresponds to the ID filed in another table. i want to run a query that select the domain_id from the users table and then gets the domain name from the domains table. Scott. Link to comment https://forums.phpfreaks.com/topic/122827-link-id-number-to-other-table/ Share on other sites More sharing options...
fenway Posted September 5, 2008 Share Posted September 5, 2008 You need a JOIN: select d.name from domains as d inner join logins as l using (domain_id) where l.username = <whatever> Link to comment https://forums.phpfreaks.com/topic/122827-link-id-number-to-other-table/#findComment-634534 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.