rockinaway Posted February 8, 2012 Share Posted February 8, 2012 I have two queries joined together with a UNION. ALL the columns that are returned have the same name except 1 field in each table. In the first table the column is called 'football_id' while in the second column it is 'cricket_id'. The query is running fine, but I just wanted to know how I can differentiate between the results that are returned as to see whether they are from the first table (where football_id is present) or the second table (where cricket_id is present). It isn't as simple as using an isset() is it? Quote Link to comment Share on other sites More sharing options...
rockinaway Posted February 8, 2012 Author Share Posted February 8, 2012 Basically this problem: http://stackoverflow.com/questions/2260816/how-to-find-out-my-result-table-in-multiple-table-search Although not sure how this method works :s Quote Link to comment Share on other sites More sharing options...
rockinaway Posted February 8, 2012 Author Share Posted February 8, 2012 Figured it out, thanks anyway Quote Link to comment Share on other sites More sharing options...
fenway Posted February 8, 2012 Share Posted February 8, 2012 Figured it out, thanks anyway How about you post the solution for everyone's benefit.... Quote Link to comment Share on other sites More sharing options...
rockinaway Posted February 9, 2012 Author Share Posted February 9, 2012 Already did that.. the link I posted about Quote Link to comment 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.