I have a table of members and a table of venues.
I currently have this select statement:
SELECT VenueName, VenueID
FROM Venue
WHERE active='Y'
ORDER BY VenueName
The result of this statement is used to populate a drop down list with venue names, which works. I'll call it "ORIGINAL SELECT".
I want to change this so the dropdown list only shows venue names linked to the member:
SELECT Venue.VenueName, Venue.VenueID, members.id, members.venueid
FROM Venue, members
WHERE Venue.VenueID = members.venueid
AND members.id='$userid'
This also works. I'll call it "NEW SELECT".
I have two superadmins whose members.venueid is all rather than a venue id number, so I would like to create a statement that runs the NEW SELECT else if members.id='all' then run ORIGINAL SELECT.
Can anyone point me in the right direction? I've tried various things.