I think I'm just having a brain fart here, but if someone could help me out I'd appreciate. Maybe it's just too late in the day for thinking...
Say I have a table `actions` with a structure and data as such: +----+--------+--------+ | id | userid | action | +----+--------+--------+ | 1 | a | foo | | 2 | a | bar | | 3 | a | baz | | 4 | b | foo | | 5 | c | foo | | 6 | c | bar | | 7 | d | foo | | 8 | d | bar | | 9 | d | baz | +----+--------+--------+ What I want to do is return all values of `userid` that have a 'foo' action but not a 'baz' action (those being b and c). I know I know the answer to this, but I'm drawing a blank at the moment. Thanks in advance if someone could give me a hand. -- Mike Johnson Smarter Living, Inc. Web Developer www.smartertravel.com [EMAIL PROTECTED] (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]