コード例 #1
0
 public function updateOrganization($id, $data)
 {
     try {
         $service = ServiceManager::getConnection(DatabaseConstants::DRAGONPHP_DS, DatabaseConstants::ORGANIZATIONS_TBL);
         $criteria = array();
         $criteriaData = array();
         array_push($criteria, array('field_name' => 'id', 'expression' => '='));
         array_push($criteriaData, $id);
         $service->setCriteria($criteria, $criteriaData);
         $service->setData($data);
         $service->update();
     } catch (Exception $ex) {
         throw new Exception($ex->getMessage());
     }
 }