当前位置: 首页>>代码示例>>PHP>>正文


PHP WebserviceField::fromQueryResult方法代码示例

本文整理汇总了PHP中WebserviceField::fromQueryResult方法的典型用法代码示例。如果您正苦于以下问题:PHP WebserviceField::fromQueryResult方法的具体用法?PHP WebserviceField::fromQueryResult怎么用?PHP WebserviceField::fromQueryResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WebserviceField的用法示例。


在下文中一共展示了WebserviceField::fromQueryResult方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: retrieveMetaForBlock

 private function retrieveMetaForBlock($block)
 {
     global $adb;
     $tabid = $this->getTabId();
     require 'user_privileges/user_privileges_' . $this->user->id . '.php';
     if ($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) {
         $sql = "select *, '0' as readonly from vtiger_field where tabid =? and block in (" . generateQuestionMarks($block) . ") and displaytype in (1,2,3,4)";
         $params = array($tabid, $block);
     } else {
         $profileList = getCurrentUserProfileList();
         if (count($profileList) > 0) {
             $sql = "SELECT vtiger_field.*, vtiger_profile2field.readonly\n\t\t\t\t\t\tFROM vtiger_field\n\t\t\t\t\t\tINNER JOIN vtiger_profile2field\n\t\t\t\t\t\tON vtiger_profile2field.fieldid = vtiger_field.fieldid\n\t\t\t\t\t\tINNER JOIN vtiger_def_org_field\n\t\t\t\t\t\tON vtiger_def_org_field.fieldid = vtiger_field.fieldid\n\t\t\t\t\t\tWHERE vtiger_field.tabid =? AND vtiger_profile2field.visible = 0 \n\t\t\t\t\t\tAND vtiger_profile2field.profileid IN (" . generateQuestionMarks($profileList) . ")\n\t\t\t\t\t\tAND vtiger_def_org_field.visible = 0 and vtiger_field.block in (" . generateQuestionMarks($block) . ") and vtiger_field.displaytype in (1,2,3,4) and vtiger_field.presence in (0,2) group by columnname";
             $params = array($tabid, $profileList, $block);
         } else {
             $sql = "SELECT vtiger_field.*, vtiger_profile2field.readonly\n\t\t\t\t\t\tFROM vtiger_field\n\t\t\t\t\t\tINNER JOIN vtiger_profile2field\n\t\t\t\t\t\tON vtiger_profile2field.fieldid = vtiger_field.fieldid\n\t\t\t\t\t\tINNER JOIN vtiger_def_org_field\n\t\t\t\t\t\tON vtiger_def_org_field.fieldid = vtiger_field.fieldid\n\t\t\t\t\t\tWHERE vtiger_field.tabid=? \n\t\t\t\t\t\tAND vtiger_profile2field.visible = 0 \n\t\t\t\t\t\tAND vtiger_def_org_field.visible = 0 and vtiger_field.block in (" . generateQuestionMarks($block) . ") and vtiger_field.displaytype in (1,2,3,4) and vtiger_field.presence in (0,2) group by columnname";
             $params = array($tabid, $block);
         }
     }
     // Bulk Save Mode: Group by is not required!?
     if (CRMEntity::isBulkSaveMode()) {
         $sql = preg_replace("/group by [^ ]*/", " ", $sql);
     }
     // END
     $result = $adb->pquery($sql, $params);
     $noofrows = $adb->num_rows($result);
     $referenceArray = array();
     $knownFieldArray = array();
     for ($i = 0; $i < $noofrows; $i++) {
         $fieldname = $adb->query_result($result, $i, "fieldname");
         if (strcasecmp($fieldname, 'imagename') === 0) {
             continue;
         }
         $webserviceField = WebserviceField::fromQueryResult($adb, $result, $i);
         $this->moduleFields[$webserviceField->getFieldName()] = $webserviceField;
     }
 }
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:36,代码来源:VtigerCRMObjectMeta.php

示例2: initialize

 function initialize()
 {
     global $adb, $current_user;
     if ($this->moduleMeta === null) {
         $moduleHandler = vtws_getModuleHandlerFromName($this->parent->getModuleName(), $current_user);
         $this->moduleMeta = $moduleHandler->getMeta();
     }
     if ($this->parent->getModuleName() == 'Products' and $this->parent->getFieldName() == 'imagename') {
         $sql = "select *, '0' as readonly from vtiger_field where vtiger_field.tabid=14 and fieldname='imagename'";
         $result = $adb->pquery($sql, array());
         $webserviceField = WebserviceField::fromQueryResult($adb, $result, 0);
         $this->fieldInfo = $webserviceField;
     } else {
         $moduleFields = $this->moduleMeta->getModuleFields();
         $this->fieldInfo = $moduleFields[$this->parent->getFieldName()];
     }
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:17,代码来源:ModTracker_Field.php


注:本文中的WebserviceField::fromQueryResult方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。