Here goes:
My goal here is to populate a drop-down menu with a list of people.
My problem is that I have a SQL query to get a full list of people and I need to subtract from that list the results returned by a second SQL statement.
I am using PHP and MySQL and I don't believe that MySQL can use the "SELECT ... MINUS SELECT ..." syntax yet.
Right now, I believe the best option would be to load both result sets into arrays and unset values from the small array that are in the full list.
The full result set consists of:
- id
- first_name
- last_name
- position
The second result set consists of:
- id (this id matches id from above)
I need help coming up with the PHP code that would best remove the id's from the full set array that are also in the second array.
I hope that all makes sense, thanks in advance for any help!!!