agpvoodoo2
Programmer
I'm having trouble getting the right records from my database to do a script to have two select boxes where you can move cities from one to the other and vice versa.
I have 3 tables, one table is a record of people, one is a record of cities in the country and the third is bridge table for the people and city, so I'm logged in it will show what cities I've been to.
If I have 4 possible cities(CA, LA, DC, NYC)
So I can select the cities I've been to with
SELECT tblperson.ID
FROM tblperson LEFT JOIN tblbridge ON tblperson.ID = tblbridge.personID
WHERE tblbridge.cityID
this gives me DC, NYC
but is there a statement I can use to select the ones that I have NOT been to.
I have 3 tables, one table is a record of people, one is a record of cities in the country and the third is bridge table for the people and city, so I'm logged in it will show what cities I've been to.
If I have 4 possible cities(CA, LA, DC, NYC)
So I can select the cities I've been to with
SELECT tblperson.ID
FROM tblperson LEFT JOIN tblbridge ON tblperson.ID = tblbridge.personID
WHERE tblbridge.cityID
this gives me DC, NYC
but is there a statement I can use to select the ones that I have NOT been to.