ludak
Active member
Just to say I come from .NET background and would know how to do this simply in .NET however Php I am just picking up, together with XENFORO stuff and trying to make sence of it.
all I am trying to do is get all the lets call the entity again Players that are (this time) not playing the Games entity.
This above will get me all the players that are playing the game, since they are all linked in the playergameslink table.
I am having hard time getting all the players from Players table, that are not already assigned to the game.
So query would be something like this
HM, this might be achivable to do it... but is there a better way to do this? I am thinking there's gotta be an easier way to pull just the players I need.
all I am trying to do is get all the lets call the entity again Players that are (this time) not playing the Games entity.
Code:
$players = $this->finder('XX:Players')
->with('PlayerGamesLink', true)
->where('PlayerGamesLink.game_id', $game_id)->fetch();
I am having hard time getting all the players from Players table, that are not already assigned to the game.
So query would be something like this
SQL:
SELECT * FROM Players P
left join PlayerGamesLink PGL
on P.player_id = PGL.player_id
where PGL.player_id == null
HM, this might be achivable to do it... but is there a better way to do this? I am thinking there's gotta be an easier way to pull just the players I need.