Answer the question
In order to leave comments, you need to log in
How to select data across multiple fields in join with matching?
Good afternoon, the question in the following is 2 tables #_users with 17 fields and a table #_content with 32 fields the essence of the question in the following is to select only id and username from the table #_users and from the table #_content select 2 fields title, created_by then match their user from the #_users table and the material placed from the #_content table, the title field title and created_by are written with the user id.
solved it like this:
select * from #_users INNER JOIN #_content using(created_by);
select id, username, created_by from #_users INNER JOIN #_content using(created_by);
Answer the question
In order to leave comments, you need to log in
select #_users.id, #_users.username, #_content.title, #_content.created_by from #_users INNER JOIN #_content using(created_by);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question