arcadeicons
Member
I need to populate the values of a cascading dropdown element from the following query...
I have it to the point where I am retrieving the all the guestIDs from add_tournament_repeat_guests filtered by the parent_id which I trigger in my 'watch' field.
I need the filters to say 'only show guestID from the the tournament guests table if the user is me OR if the user is in my friends list'
userID = {$my->id} is working fine
OR add_friends.venue_owner ={$my->id} errors unknown column
Code:
SELECT add_tournament_repeat_guests.guestID
FROM add_tournament_repeat_guests
JOIN add_friends
ON add_friends.friend_id = add_tournament_repeat_guests.guestID
WHERE add_tournament_repeat_guests.parent_id = 18 AND add_tournament_repeat_guests.guestID = 633
OR add_friends.venue_owner = 633
GROUP BY guestID
I have it to the point where I am retrieving the all the guestIDs from add_tournament_repeat_guests filtered by the parent_id which I trigger in my 'watch' field.
I need the filters to say 'only show guestID from the the tournament guests table if the user is me OR if the user is in my friends list'
userID = {$my->id} is working fine
OR add_friends.venue_owner ={$my->id} errors unknown column
Last edited: