Summary table done.
This commit is contained in:
parent
bf36486bf3
commit
8758598104
4 changed files with 44 additions and 6 deletions
|
|
@ -169,11 +169,30 @@ class Team
|
|||
return $res['solved'];
|
||||
}
|
||||
|
||||
function get_solvedExercices()
|
||||
function get_solvedExercices($id_theme=-1)
|
||||
{
|
||||
$db = new BDD();
|
||||
$ids = $db->query("");
|
||||
$db->deconnexion();
|
||||
if ($id_theme != -1)
|
||||
{
|
||||
$db = new BDD();
|
||||
$ids = $db->query("SELECT id_theme, id_exercice
|
||||
FROM `solved`
|
||||
LEFT OUTER JOIN exercices ON `solved`.id_exercice = `exercices`.id
|
||||
WHERE id_user =".$this->id." AND id_theme =".$id_theme);
|
||||
$db->deconnexion();
|
||||
|
||||
$array = array();
|
||||
$i = 0;
|
||||
if ($ids)
|
||||
{
|
||||
foreach ($ids as $id){
|
||||
$array[] = new Exercice($id['id_exercice']);
|
||||
}
|
||||
}
|
||||
|
||||
return $array;
|
||||
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
function authenticate($certificate)
|
||||
|
|
|
|||
Reference in a new issue