johnsmith153 Posted August 26, 2010 Share Posted August 26, 2010 SELECT Name FROM table1 UNION ALL Name FROM table2 INNER JOIN etc... (requires both table1 and table 2 to be linked to table 3) Quote Link to comment https://forums.phpfreaks.com/topic/211812-can-i-use-union-all-and-inner-join-together/ Share on other sites More sharing options...
mikosiko Posted August 26, 2010 Share Posted August 26, 2010 SELECT Name FROM table1 UNION ALL Name FROM table2 INNER JOIN etc... (requires both table1 and table 2 to be linked to table 3) the sentence that you posted is wrong... I saw also you other post... let me give you a suggestion that could help you to get answers... why you don explain exactly what you want to do (problem to solve), which are the tables involved and their structure ... only with that information people here will be able to understand your problem better and offer some insight... just MHO. Quote Link to comment https://forums.phpfreaks.com/topic/211812-can-i-use-union-all-and-inner-join-together/#findComment-1104094 Share on other sites More sharing options...
Mchl Posted August 26, 2010 Share Posted August 26, 2010 You can: SELECT Name FROM ( SELECT Name FROM table1 UNION ALL SELECT Name FROM table2 ) AS uq INNER JOIN ... Quote Link to comment https://forums.phpfreaks.com/topic/211812-can-i-use-union-all-and-inner-join-together/#findComment-1104097 Share on other sites More sharing options...
johnsmith153 Posted August 26, 2010 Author Share Posted August 26, 2010 Simple question, simple answer. Thanks Mchl, appreciate it. Not sure what mikosiko is on about. How can my question be wrong? Tables, structure?? Don't be silly. You clearly looked at this, didn't understand and just assume that I have been lazy or not posted enough information. Anyone with a reasonable level of ability or higher would understand this. Quote Link to comment https://forums.phpfreaks.com/topic/211812-can-i-use-union-all-and-inner-join-together/#findComment-1104110 Share on other sites More sharing options...
mikosiko Posted August 26, 2010 Share Posted August 26, 2010 John... if you read my answer again you will realize that I did'n say that your question was wrong... specifically I said "the sentence that you posted is wrong" ... big difference don't you think? and my additional comment was only pursuing more information to help you in the best way possible.... if in addition you just read the Sticky # 2 in this forum you will see that I was asking for basically the same things. your comments about my understanding or knowledge are totally uncalled for. for me is a closed issue. Quote Link to comment https://forums.phpfreaks.com/topic/211812-can-i-use-union-all-and-inner-join-together/#findComment-1104115 Share on other sites More sharing options...
johnsmith153 Posted August 26, 2010 Author Share Posted August 26, 2010 You idiot. Not every post needs full detailed information. The question "how do you print out text from php?" wouldn't need someone to give details of what the text is, the answer echo $variable would be enough. Question / sentence, same thing in this case. You tried to give a little attitude but your PHP skills don't match the attitude. When you have top skills like one or two on here then no problem, but make sure you give it at the right time. Quote Link to comment https://forums.phpfreaks.com/topic/211812-can-i-use-union-all-and-inner-join-together/#findComment-1104123 Share on other sites More sharing options...
Mchl Posted August 26, 2010 Share Posted August 26, 2010 I actually am sorry to have helped you. This won't happen again. Quote Link to comment https://forums.phpfreaks.com/topic/211812-can-i-use-union-all-and-inner-join-together/#findComment-1104124 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.