SidianConsulting
Programmer
Hi everyone:
Here is an example of a table I have:
event_id other_id
1 45
1 59
1 75
1 14
4 14
4 12
4 45
5 14
5 45
--------------------------
Say I have a list of values passed in a FORM variable via checkboxes:
45,14
I need to be able to get the event_id's that have ONLY BOTH 45 and 14 other_id values (in the example data above, only event_id 5 would be a valid return value from the SQL code). If the event_id is associated with anything but these two other_id values, I do not want it returned.
I've messed with IN, NOT IN, ANY, ALL, and EXISTS list search conditions to no avail.
Thanks,
Tek
Here is an example of a table I have:
event_id other_id
1 45
1 59
1 75
1 14
4 14
4 12
4 45
5 14
5 45
--------------------------
Say I have a list of values passed in a FORM variable via checkboxes:
45,14
I need to be able to get the event_id's that have ONLY BOTH 45 and 14 other_id values (in the example data above, only event_id 5 would be a valid return value from the SQL code). If the event_id is associated with anything but these two other_id values, I do not want it returned.
I've messed with IN, NOT IN, ANY, ALL, and EXISTS list search conditions to no avail.
Thanks,
Tek