Add some classes and fix some bugs in class Team
This commit is contained in:
parent
9145325fd8
commit
eac6118532
1 changed files with 14 additions and 0 deletions
|
@ -155,6 +155,20 @@ class Team
|
|||
return 0;
|
||||
}
|
||||
|
||||
function get_nbResExercisesByTheme($id_theme)
|
||||
{
|
||||
$db = new BDD();
|
||||
$res = $db->unique_query("SELECT e.id_theme AS theme, count( s.id ) AS solved
|
||||
FROM solved AS s
|
||||
RIGHT OUTER JOIN exercices AS e ON e.id = s.id_exercice
|
||||
AND s.id_user = ".$this->id."
|
||||
AND e.id_theme = ".$id_theme);
|
||||
|
||||
$db->deconnexion();
|
||||
|
||||
return $res['solved'];
|
||||
}
|
||||
|
||||
function authenticate($certificate)
|
||||
{
|
||||
//TODO
|
||||
|
|
Reference in a new issue