I have a query question that I can't seem to find an answer to.  Perhaps 
someone can suggest something.  I will try to explain what I am trying to do:

I have what is essentially 2 queries that I would like to sum into the same 
result set.  I do not know if it is possible, but it would make my life a lot 
easer if it were.

Basically I would have something similar to the following:

TABLE user_objects
userid                          object
1                               A
1                               B
2                               D

TABLE group_objects
groupid                         object
1                               B
1                               C
2                               E

TABLE user_groups
userid                          groupid
1                               1

with the above I can do a query SELECT object FROM user_objects WHERE 
userid=1:
object
A
B

then I can do SELECT group_objects.object FROM group_objects, user_groups 
WHERE group_objects.groupid = user_groups.groupid AND user_groups.userid=1:
object
B
C

now somehow I would like to get an output like:
A
B
C

in one query.  Is this possible somehow?


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to