![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 496 Pomógł: 2 Dołączył: 15.07.2011 Skąd: Katowice Ostrzeżenie: (0%) ![]() ![]() |
Witam,
Mam następujący schemat bazy z dwiema tabelami:
Jak widać Tabela MEET zawiera dwa pola z ID pochodzące z tabeli TEAM. Dzięki temu MEET (SPOTKANIE) to połącznie dwóch TEAM (DRUŻYN). I teraz tak: w Kontrolerze action.class.php w metodzie executeIndex() mam tak:
Natomiast w Widoku indexSuccess.php mam tak:
Nie wiem jednak jak wyświetlić nazwy drużyn zamiast ID proszę o podpowiedź, dzięki |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 129 Pomógł: 17 Dołączył: 17.09.2012 Ostrzeżenie: (0%) ![]() ![]() |
w basach masz i tu znajdziesz metody które możesz wywołać na obiekcie Meet /** * BaseMeet * * This class has been auto-generated by the Doctrine ORM Framework * * @property integer $team1_id * @property integer $team2_id * @property Team $Team1 * @property Team $Team2 * * @method integer getTeam1Id() Returns the current record's "team1_id" value * @method integer getTeam2Id() Returns the current record's "team2_id" value * @method Team getTeam1() Returns the current record's "Team1" value * @method Team getTeam2() Returns the current record's "Team2" value * @method Meet setTeam1Id() Sets the current record's "team1_id" value * @method Meet setTeam2Id() Sets the current record's "team2_id" value * @method Meet setTeam1() Sets the current record's "Team1" value * @method Meet setTeam2() Sets the current record's "Team2" value * * @package test * @subpackage model * @author Your name here * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ */ abstract class BaseMeet extends sfDoctrineRecord Ten post edytował szalek01 13.10.2012, 19:40:43 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 5.10.2025 - 14:31 |