function updatePersonRecord($personDTO) { self::openConn(); $this->con->beginTransaction(); try { AddressDAO::updateAddress($this->con, $personDTO->getAddrDTO()); PhoneDAO::updatePhone($this->con, $personDTO->getPhoneDTO()); $person_id = PersonDAO::updatePerson($this->con, $personDTO); $return = new ResultDTO($person_id, "UPDATED"); $json = json_encode($return); echo $json; $this->con->commit(); self::closeConn(); } catch (PDOException $e) { $person_id = "person insert Error: " . $e->getMessage(); $this->con->rollBack(); } }