Bonjour,
Voila je rencontre un petit problème avec mon code.
J'ai la fonction suivante dans le controller :
public function notesEtudiant($id) {
$this->set('notes', $this->Etudiant->find('all', array(
'fields' => '*',
'joins' => array(
array(
'table' => 'notes',
'alias' => 'Note',
'type' => 'LEFT',
'conditions' => array('Note.etudiant_id = '. $id .'')
)
)
)));
}
Je ne sais pas comment remplir ma view... Je ne comprend pas comment le set fonctionne..
<h1> FICHE ETUDIANT :</h1>
<table>
<tr>
<th>Id</th>
<th>Matière</th>
<th>Note</th>
</tr>
<tr>
<td><?php echo ... ?></td>
<td><?php echo ... ?></td>
<td><?php echo ... ?></td>
</tr>
</table>
Pourriez vous m'aider ?
Merci :)