I want a select statement to retrieve those entryIDs that their catIDs are in a list, let's say: 10 and 11. In this case it should bring entryIDs 2 and 4.
Actually, we don't know in advance the list of the catIDs, so maybe we ask to bring those entryIDs that has catIDs 11 and 15 and 16. In this case it should bring the entryID 3.
The way that we can provide the list is a comma separated string like "10,11" in the first case and "11, 15, 16" in the second case.
Thank you so much Shammat for your response.
I think I should have posted my question in the MySQL section because currently, I am using it.
Anyway, as far as I know, MySQL doesn't support With clause, so, how can you make an equivalent for your code for MySQL?