Reputation: 1747
I have two tables (feasy_marcacao and feasy_servico). For now I have this code:
<td><?php echo $feasy_marcacao->getServicoId() ?></td>
but this gets me the Id number and I want the description for that id. Here it is my schema:
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 }
Hope I explained myself well. Thank you for your time.
Upvotes: 0
Views: 179
Reputation: 6923
Straight forward :
echo $feasy_marcacao->getFeasyServico()->getDescricao();
Upvotes: 2