Harmster Posted June 15, 2013 Posted June 15, 2013 Hey, I am trying to make a selector to check something on my website (A social site) So i want to check if there's a friend relation between 2 users. but here's the thing: I've got a user template that has the following fields (and some more): -summoner_id (text) -summoner_name (text)And i've got a match template having a repeater field called fellow_players this fellow players has a summoner_id field aswell so: -summoner_id (text) Now i've got a friend template with a few fields including -user1 (page to user template) -user2 (page to user template) Now what i want is to check if there's a friend template with user1->summoner_id OR user2->summoner_id == fellow_player->summoner_id Is this doable with a selector or do i need to use more php?
slkwrm Posted June 16, 2013 Posted June 16, 2013 Hi, Harmster. Your explanation is a bit vague in terms of what you want to achieve on a conceptual level. Where do you want to place your code? What is the relation between fellow player and user1/user2? Are fellow players users? What about summoner?) These questions, while may seem a bit excessive, will exclude double-meaning and help others get your idea more easily. (and you will get help quicker )
Harmster Posted June 16, 2013 Author Posted June 16, 2013 The purpose for this is basicly to check if a user that is logged in is friended with one of the fellow players listed in match->fellow_players A fellow player summoner_id might not exist in the user templates at all. A friend is saved in the friend template user_1 and user_2 being either the logged in user or the friended user. I hope this clearified anything... Its hard to explain
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now