コード例 #1
0
ファイル: Home.php プロジェクト: peterweck/catman
 /**
  * Objeto de cursos asociados a un tutor
  * 
  */
 private function _getCursos()
 {
     global $uid;
     $periodo = CatManUtils::getPeriodoActual();
     $db = new DB();
     $sql = "SELECT ct.id, c.nombre FROM " . TBL_CURSOS . " ct " . "INNER JOIN " . TBL_CATEDRAS . " c ON c.id = ct.catedra_id " . "WHERE periodo_id = {$periodo}";
     $res = $db->query($sql);
     $data = array();
     while ($line = $db->fetchNextObject($res)) {
         $data[$line->id] = $line->nombre;
     }
     return $data;
 }