本文整理汇总了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];
}
示例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);
}
示例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);
}