當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Vtiger_Field::delete方法代碼示例

本文整理匯總了PHP中Vtiger_Field::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vtiger_Field::delete方法的具體用法?PHP Vtiger_Field::delete怎麽用?PHP Vtiger_Field::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Vtiger_Field的用法示例。


在下文中一共展示了Vtiger_Field::delete方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: DeleteALLFields

 function DeleteALLFields()
 {
     global $adb;
     include_once 'vtlib/Vtiger/Module.php';
     $take_info = $adb->query("select * from vtiger_field where tabid = '" . $this->tabid . "'", true, "Error DeleteAddedFields()");
     foreach ($take_info as $single_field) {
         $take_info = $adb->query("select * from vtiger_field where tabid = '" . $single_field['tabid'] . "' and fieldname = '" . $single_field['fieldname'] . "'", true, "Error DeleteAddedFields()");
         if ($adb->num_rows($take_info) > 0) {
             $valuemap = array();
             $moduleInstance = Vtiger_Module::getInstance($single_field['module']);
             $valuemap['fieldid'] = $adb->query_result($take_info, 0, 'fieldid');
             $valuemap['fieldname'] = $adb->query_result($take_info, 0, 'fieldname');
             $valuemap['fieldlabel'] = $adb->query_result($take_info, 0, 'fieldlabel');
             $valuemap['columnname'] = $adb->query_result($take_info, 0, 'columnname');
             $valuemap['tablename'] = $adb->query_result($take_info, 0, 'tablename');
             $valuemap['uitype'] = $adb->query_result($take_info, 0, 'uitype');
             $valuemap['typeofdata'] = $adb->query_result($take_info, 0, 'typeofdata');
             $valuemap['block'] = $adb->query_result($take_info, 0, "block");
             $fieldInstance = new Vtiger_Field();
             $fieldInstance->initialize($valuemap, $moduleInstance);
             $fieldInstance->delete();
         }
     }
     $delete = $adb->query("delete from vtiger_fieldmodulerel where module = '" . $this->module_name . "' or relmodule = '" . $this->module_name . "' ", true, "Error DeleteAddedFields()");
 }
開發者ID:noclav,項目名稱:UpdatePackages,代碼行數:25,代碼來源:init.php


注:本文中的Vtiger_Field::delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。