Thanks for the effort so far. The problem is: I have a solution that works somehow. A brute force solution, so to speak. I make simple SQL queries in a foreach loop:
SELECT products_id from table WHERE products_class = 11
Then I save the results in an array like this with the product_id as array key:
array[$products_id] = 1
then I make the query for the second category
SELECT products_id from table WHERE products_class = 14
array[$products_id] = array[$products_id]+1
and so on. N times (in above example n would be 3). And then I check which arrays have a value of n (=matched everytime) and this are my results. Problem is: The solution is far too slow. In my implementation and with the number of entries in my database the webpage took 8 seconds to load and produced more than 5000 queries in the database. Because sometims n can be up to 6. So I wonder if there is a more elegant solution whithout the loop. Just a single Mysql query perhaps.