>I can't query where B.thing != "10", because that will include the "11,1" 
>entry, which gets me "Joe", which I don't want.

You might be able to get away using something like this though it will not 
be usable with large tables without some other limitations applied:

SELECT user.name FROM user LEFT OUTER JOIN thing ON user.id=thing.user 
GROUP BY user.id HAVING thing.id != "10"

It depends on whether the "HAVING" still gets to see all the results or 
whether it only gets what is left at the "top" of the "GROUP BY" and also 
whether having the single entity in the set is enough to removes the entire 
"GROUP BY" set.  Worth a try though.

Failing that you will have to simulate a sub query either by using a second 
table or by using some PHP logic on the results.  If the numbers are small, 
you could do this with PHP without much hassle (lots of nice array functions).



Island Net AMT Solutions Group Inc.          Telephone:          250 383-0096
1412 Quadra                                  Toll Free:        1 800 331-3055
Victoria, B.C.                               Fax:                250 383-6698
V8W 2L1                                      E-Mail:    [EMAIL PROTECTED]
Canada                                       WWW:   http://www.islandnet.com/

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to