#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    35
    Rep Power
    3

    Telling the difference between two UNIONS in a result set


    I make a union query that queries the same table 2 different ways and it works really well.

    My question is if there is some way I can tell which result row came from which union that I could interpret with code? for example make a temporary column with 1 for first union and 2 for second union?

    Or at least something to this effect...

    R
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    for example make a temporary column with 1 for first union and 2 for second union?
    Yes
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo