you can check my database class
when i call this methode
public function getNote() {
$epreuve = $this->_db->get('module', array('concour_code', '=', $this->data()->concour_code));
$id = $this->data()->ID;
foreach($epreuve->results() as $epreu){
$epreu_code = $epreu->code;
echo "<tr>";
echo "<td>".$epreu->epreuve_code."</td><td>".$epreu->designation."</td>";
$module = Database::getInstance()->query("SELECT note_condidat.note,note_condidat.condidat_concour_id,note_condidat.module_code
FROM note_condidat,
WHERE note_condidat.condidat_concour_id = {$id} AND note_condidat.module_code = {$epreu_code} ");
foreach($module->results() as $mod){
echo "<td>".$mod->note."</td>";
}
echo "</tr>";
}
}
Note : $this->data()->ID return user ID
i'm getting wrong data !! it take note from the module table not from note table