/** * Renvoie les Competence liées à un Qg * @param Qg $qg * @return CompetenceCollection */ public static function getByQg(Qg $qg) { $req = "SELECT * FROM competence WHERE idQg = '" . $qg->getIdQg() . "';"; return DbHandler::collFromQuery($req, 'Competence', 'CompetenceCollection'); }
/** * Renvoie les Productions liés au Qg fourni * @var Qg $qg * @return ProductionCollection */ public static function getByQg(Qg $qg) { $req = "SELECT * from production WHERE idUnite IN (SELECT unite.idUnite FROM unite WHERE unite.idQg = " . $qg->getIdQg() . ")"; return DbHandler::collFromQuery($req, 'Production', 'ProductionCollection'); }
/** * Renvoie les Traj liées à un Qg * @param Qg $qg * @return TrajCollection */ public static function getByQg(Qg $qg) { $req = "SELECT * FROM traj WHERE idQg = '" . $qg->getIdQg() . " ORDER BY ordre ASC';"; return DbHandler::collFromQuery($req, 'Traj', 'TrajCollection'); }