0

could you help my with retrieve data from databse? I have got 3 tables: raids,teams and teams_raids.

I would like to get all rows from Teams which that are associated with the table raids. Like this http://postimg.org/image/b11nhr53x/ . In my countroler wrote:

$usersraids = TableRegistry::get('TeamsRaids'); 
$teamId = $usersraids->find('list', 
    [ 'contain' => ['Teams'],
    ['conditions' => ['raid_id ' => $id, ]
]]);`

but i got ALL rows from table TEAM.

Thank for help. Greetings!

arilia
  • 9,373
  • 2
  • 20
  • 44
rejencina
  • 29
  • 3

0 Answers0