本文整理匯總了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()");
}