coming back to my earlier question but much more simplified portion of it :)
I the following table :
theTable ----------------------- ID | int (key) colorID | int itemID | int -----------------------
how do I select all itemIDs that have colorID = 1 and colorID = 2 and colorID = 3 ... and colorID = N ?
I didn't read the previous version of your question, but is the set of 'n' color ID's known at query time? If so,
SELECT ID FROM theTable WHERE colorID in {1, 2, 3, 4, ..., n}
Or if you want say a range where colorID is between 5 and 10,
SELECT ID FROM theTable WHERE colorID >= 5 AND colorID <= 10
-Fred
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]