getMonat(),0,4); $ma_id = $this->getMaId(); if ($con === null) { $con = Propel::getConnection(LohnabrechnungPeer::DATABASE_NAME, Propel::CONNECTION_READ); } $query = "select sum($typ) from lohnabrechnung where ma_id = :p1 and monat like :p2"; $stmt = $con->prepare($query); $stmt->bindValue(':p1', $ma_id, PDO::PARAM_INT); $stmt->bindValue(':p2', "$jahr%", PDO::PARAM_STR); $succ = $stmt->execute(); if (!$succ) throw new Exception("Statement execution not succeeded"); $summe = $stmt->fetch(); return $summe[0]; } } // Lohnabrechnung