Ok, sorry if this is a repost, I really don’t know how to word what I’m looking for to really search for it.
I have 3 tables:
Amenities:
AmenitiesID
Name
resort_amenities
ResortAmenitiesID
ResortID
AmenityID
resorts
ResortID
ResortName
and so on...
I am working on the code that links the amenties to the resort, and saved in resort_amenities.
What I want is to have a jQuery modal dialog come up with all the amenities from the amenities table, that aren’t already linked to that resort.
Right now in my ajax call I pass the resort id, to be used in the sql somewhere.
I believe I need a union but have never built one, out side of school years ago.
Thanks
So you want, for a specific resort, the set of amenities not associated with that resort:
This is a set substraction, of
S = S1 - S2, whereS1is the set of all amenities, andS2is the set of amenities that are already linked to that resort.