The title is probably a bit confusing, but I hope this will be easier to understand:
The dashboard is setup like this:
1. user enters a product_id (single or multiple) and the input is saved in a variable 'user_input'
2. the dashboard then returns all customer_ids associated with each product_id and also lists all other product_ids associated with each customer_id.
I'm using a JOIN: first query returns all the product_ids and some other columns. The second query (UNION) uses user_input to return the customer_ids and and the associated product_ids.
This works as expected, but for one detail. I would like to exclude from the results of each customer_id the one product_id that was entered in the dashboard prompt.
Any ideas or hints how to make this happen would be greatly appreciated.