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


PHP FabrikWorker::bigSelects方法代码示例

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


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

示例1: getDbo

 /**
  * Get a database object
  *
  * Returns the global {@link JDatabase} object, only creating it
  * if it doesn't already exist.
  *
  * @param   bool  $loadJoomlaDb Force (if true) the loading of the main J database,
  *                              needed in admin to connect to J db whilst still using fab db drivers "{package}"
  *                              replacement text
  *
  * @param   mixed $cnnId        If null then loads the fabrik default connection, if an int then loads the
  *                              specified connection by its id
  *
  * @return  JDatabaseDriver object
  */
 public static function getDbo($loadJoomlaDb = false, $cnnId = null)
 {
     $sig = (int) $loadJoomlaDb . '.' . $cnnId;
     if (!self::$database) {
         self::$database = array();
     }
     if (!array_key_exists($sig, self::$database)) {
         JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_fabrik/tables');
         $conf = JFactory::getConfig();
         if (!$loadJoomlaDb) {
             $cnModel = JModelLegacy::getInstance('Connection', 'FabrikFEModel');
             $cn = $cnModel->getConnection($cnnId);
             $host = $cn->host;
             $user = $cn->user;
             $password = $cn->password;
             $database = $cn->database;
         } else {
             $host = $conf->get('host');
             $user = $conf->get('user');
             $password = $conf->get('password');
             $database = $conf->get('db');
         }
         $dbPrefix = $conf->get('dbprefix');
         $driver = $conf->get('dbtype');
         // Test for swapping db table names
         $driver .= '_fab';
         $options = array('driver' => $driver, 'host' => $host, 'user' => $user, 'password' => $password, 'database' => $database, 'prefix' => $dbPrefix);
         $version = new JVersion();
         self::$database[$sig] = $version->RELEASE > 2.5 ? JDatabaseDriver::getInstance($options) : JDatabase::getInstance($options);
         FabrikWorker::bigSelects(self::$database[$sig]);
     }
     return self::$database[$sig];
 }
开发者ID:glauberm,项目名称:cinevi,代码行数:48,代码来源:parent.php

示例2: setBigSelects

 /**
  * Once we have a few table joins, our select statements are
  * getting big enough to hit default select length max in MySQL.
  * Added per-list setting to enable_big_selects.
  *
  * 03/10/2012 - Should preserve any old list settings, but this is now set in the global config
  * We set it on the main J db in the system plugin setBigSelects() but should do here as well as we
  * may not be dealing with the same db.
  *
  * 2012-10-19 - $$$ hugh - trouble with preserving old list settings is there is no way to change them, without
  * directly poking around in the params in the database.  Commenting out the per-list checking.
  *
  * @deprecated   now handled in FabrikHelper::getDbo(), as it needs to apply to all queries, including internal / default connection ones.
  * @since   3/16/2010
  *
  * @return  void
  */
 public function setBigSelects()
 {
     $fabrikDb = $this->getDb();
     FabrikWorker::bigSelects($fabrikDb);
 }
开发者ID:pascal26,项目名称:fabrik,代码行数:22,代码来源:list.php

示例3: setBigSelects

 /**
  * From Global configuration setting, set big select for main J database
  *
  * @since    3.0.7
  *
  * @return  void
  */
 protected function setBigSelects()
 {
     $db = JFactory::getDbo();
     FabrikWorker::bigSelects($db);
 }
开发者ID:glauberm,项目名称:cinevi,代码行数:12,代码来源:fabrik.php


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