2011-08-23 58 views
0

我有兩個表(feasy_marcacao和feasy_servico)。現在我有這樣的代碼:從symfony中獲取外部表的另一個字段

<td><?php echo $feasy_marcacao->getServicoId() ?></td> 

但這讓我的身份證號碼,我想該ID的說明。 這裏是我的模式:

FeasyServico: 
    columns: 
    descricao: { type: string(255), notnull: true, unique: true } 

FeasyMarcacao: 
    actAs: { Timestampable: ~ } 
    columns: 
    nome: { type: string(255), notnull: true } 
    email: { type: string(255), notnull: true } 
    contacto: { type: string(255), notnull: true } 
    servico_id: { type: integer, notnull: true } 
    dia: { type: date, notnull: true } 
    hora: { type: time, notnull: true } 
    relations: 
    FeasyServico: { onDelete: CASCADE, local: servico_id, foreign: id } 

希望我解釋清楚自己。感謝您的時間。

回答

2

直截了當:

echo $feasy_marcacao->getFeasyServico()->getDescricao(); 
+0

非常感謝你......它的工作的代碼行..謝謝:) –

+0

保存量! –

相關問題