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


PHP DBManager::createTableParams方法代码示例

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


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

示例1: foreach

 /**
  * If auditing is enabled, create the audit table.
  *
  * Function is used by the install scripts and a repair utility in the admin panel.
  *
  * Internal function, do not override.
  */
 function create_audit_table()
 {
     global $dictionary;
     $table_name = $this->get_audit_table_name();
     require 'metadata/audit_templateMetaData.php';
     // Bug: 52583 Need ability to customize template for audit tables
     $custom = 'custom/metadata/audit_templateMetaData_' . $this->getTableName() . '.php';
     if (file_exists($custom)) {
         require $custom;
     }
     $fieldDefs = $dictionary['audit']['fields'];
     $indices = $dictionary['audit']['indices'];
     // Renaming template indexes to fit the particular audit table (removed the brittle hard coding)
     foreach ($indices as $nr => $properties) {
         $indices[$nr]['name'] = 'idx_' . strtolower($this->getTableName()) . '_' . $properties['name'];
     }
     $engine = null;
     if (isset($dictionary['audit']['engine'])) {
         $engine = $dictionary['audit']['engine'];
     } else {
         if (isset($dictionary[$this->getObjectName()]['engine'])) {
             $engine = $dictionary[$this->getObjectName()]['engine'];
         }
     }
     $this->db->createTableParams($table_name, $fieldDefs, $indices, $engine);
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:33,代码来源:SugarBean.php

示例2: create_audit_table

 /**
  * If auditing is enabled, create the audit table.
  *
  * Function is used by the install scripts and a repair utility in the admin panel.
  */
 public final function create_audit_table()
 {
     global $dictionary;
     $table_name = $this->get_audit_table_name();
     require DOCROOT . 'metadata/audit_templateMetaData.php';
     // Bug: 52583 Need ability to customize template for audit tables
     if (file_exists($custom = DOCROOT . 'custom/metadata/audit_templateMetaData_' . $this->getTableName() . '.php')) {
         require $custom;
     }
     $fieldDefs = (array) array_get($dictionary, 'audit.fields');
     $indices = (array) array_get($dictionary, 'audit.indices');
     // Renaming template indexes to fit the particular audit table (removed the brittle hard coding)
     foreach ($indices as $nr => $properties) {
         $indices[$nr]['name'] = 'idx_' . strtolower($this->getTableName()) . '_' . $properties['name'];
     }
     $engine = array_get($dictionary, 'audit.engine', array_get($dictionary, "{$this->getObjectName()}.engine"));
     $this->db->createTableParams($table_name, $fieldDefs, $indices, $engine);
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:23,代码来源:SugarBean.php

示例3: createTableParams

 protected function createTableParams($tablename, $fieldDefs, $indices)
 {
     $this->created[$tablename] = true;
     return $this->_db->createTableParams($tablename, $fieldDefs, $indices);
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:5,代码来源:DBManagerTest.php


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