コード例 #1
0
 public function updateProject($id, $data)
 {
     $project = project::updateProject($id, $data);
     return $project;
 }
コード例 #2
0
 public static function updateProject($id, $data)
 {
     try {
         $loggedInUserId = AppUtil::getLoggerInUserId();
         $project = $project = project::updateProject($id, $data, $loggedInUserId);
         if ($project == 1) {
             echo AppUtil::getReturnStatus("Successful", "Project updated successfully");
         } else {
             if ($project == 0) {
                 echo AppUtil::getReturnStatus("Unsuccessful", "Database Error Occurred");
             } else {
                 echo AppUtil::getReturnStatus("Unsuccessful", "Project With Same Name already Exist");
             }
         }
     } catch (Exception $e) {
         echo AppUtil::getReturnStatus("Unsuccessful", "Unknown database error occurred");
     }
 }