Hello,
thanks for your works. There is a bug when i create a match and after i want to insert the players list of two team, i enter in the match content and when i click on "Players" tab i received this error:
* user warning: Column 'nid' in where clause is ambiguous query: SELECT test_node.title, test_leaguesite_player.player_id FROM test_node LEFT JOIN test_leaguesite_player ON test_node.nid = test_leaguesite_player.nid WHERE nid = 10 OR nid = 11; in /var/www/xxx/htdocs/test/sites/all/modules/leaguesite/leaguesite_player/leaguesite_player.admin.inc on line 411.
* warning: Invalid argument supplied for foreach() in /var/www/xxx/htdocs/test/sites/all/modules/leaguesite/leaguesite_player/leaguesite_player.admin.inc on line 477.
And i want to know: when i create a player how can i associate this player to a specific team?
Thanks.
Comments
Comment #1
dvitali commentedI modify the file leaguesite_player.admin.inc at line 411:
$teams = db_query('SELECT {node}.title, {leaguesite_player}.player_id FROM {node} LEFT JOIN {leaguesite_player} ON {node}.nid = {leaguesite_player}.nid WHERE {node}.nid = %d OR {node}.nid = %d;', $node->home_team, $node->away_team);
and now i wath only one team of the match but it tell me there are no player in the team.
And the other team?
How can i associate players to a specific team?
Comment #2
Alun commentedThanks dvitali for that fix, I'll make sure I update it.
To associate a player with a team, go to the team node page, click edit, and you will notice a tab that says 'Players' which you can click on and then add players to a team.
Thanks
Alun
Comment #3
dvitali commentedI associate a player with a team, but in the match tab players not appears. But the query before it's ok modify with my code?
If you need help my msn is dvitali74@hotmail.it.
Thanks.
Comment #4
Alun commentedOk I'll take a look at the players issue. Yes the query modification is correct.
Thanks!
Alun
Comment #5
dvitali commentedThanks. I'm waiting your fix.
Comment #6
dvitali commentedOk Anul, i already solved the problem. You must modify the query in:
$teams = db_query('SELECT {node}.nid, {node}.title, {leaguesite_player}.player_id FROM {node} LEFT JOIN {leaguesite_player} ON {node}.nid = {leaguesite_player}.nid WHERE {node}.nid = %d OR {node}.nid = %d;', $node->home_team, $node->away_team);
because in that query you must found also {node}.nid.
Now it works.
Comment #7
dvitali commentedNow i watch the list of players and i can choice the position of one of us but don't save this data.
:)
Comment #8
Alun commentedI have committed the patch for this and also for the issue at #914820: Team players of match not saved
Regards.
Alun