示例#1
0
         $aValues[$aField['FLD_NAME']] = '';
     }
 }
 try {
     $aRow = $oAdditionalTables->getDataTable($oForm->fields[$oForm->fields[$sField]->pmconnection]->pmtable, $aKeys);
 } catch (Exception $oError) {
     $aRow = false;
 }
 if ($aRow) {
     foreach ($aValues as $sKey => $sValue) {
         if ($sKey != $oForm->fields[$sField]->pmfield) {
             $aValues[$sKey] = $aRow[$sKey];
         }
     }
     try {
         $oAdditionalTables->updateDataInTable($oForm->fields[$oForm->fields[$sField]->pmconnection]->pmtable, $aValues);
     } catch (Exception $oError) {
         //Nothing
     }
 } else {
     try {
         // assembling the field list in order to save the data ina new record of a pm table
         if (empty($newValues)) {
             $newValues = $aValues;
         } else {
             foreach ($aValues as $aValueKey => $aValueCont) {
                 if (trim($newValues[$aValueKey]) == '') {
                     $newValues[$aValueKey] = $aValueCont;
                 }
             }
         }