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


PHP Piwik::getTablesCreateSql方法代码示例

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


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

示例1: update

	static function update()
	{
		$sqlarray = array(
			'ALTER TABLE `'. Piwik::prefixTable('log_visit') .'`
				ADD `visit_goal_converted` VARCHAR( 1 ) NOT NULL AFTER `visit_total_time`' => false,
			// 0.2.27 [826]
			'ALTER IGNORE TABLE `'. Piwik::prefixTable('log_visit') .'`
				CHANGE `visit_goal_converted` `visit_goal_converted` TINYINT(1) NOT NULL' => false,
		);

		$tables = Piwik::getTablesCreateSql();
		$sqlarray[ $tables['log_conversion'] ] = false;
		$sqlarray[ $tables['goal'] ] = false;

		$tables = Piwik::getTablesInstalled();
		foreach($tables as $tableName)
		{
			if(preg_match('/archive_/', $tableName) == 1)
			{
				$sqlarray[ 'CREATE INDEX index_all ON '. $tableName .' (`idsite`,`date1`,`date2`,`name`,`ts_archived`)' ] = false;
			}
		}

		Piwik_Updater::updateDatabase(__FILE__, $sqlarray);
	}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:25,代码来源:0.2.27.php

示例2: update

	static function update()
	{
		$tables = Piwik::getTablesCreateSql();
		Piwik_Updater::updateDatabase(__FILE__, array(
			'DROP TABLE IF EXISTS `'. Piwik::prefixTable('option') .'`' => false,
			$tables['option'] => false,
		));
	}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:8,代码来源:0.2.13.php

示例3: getTableCreateSql

 /**
  * Get the SQL to create a specific Piwik table
  *
  * @param string $tableName
  * @return string SQL
  */
 public function getTableCreateSql($tableName)
 {
     $tables = Piwik::getTablesCreateSql();
     if (!isset($tables[$tableName])) {
         throw new Exception("The table '{$tableName}' SQL creation code couldn't be found.");
     }
     return $tables[$tableName];
 }
开发者ID:neolf,项目名称:PIWIK4MOBILE,代码行数:14,代码来源:Myisam.php

示例4: update

 static function update()
 {
     $tables = Piwik::getTablesCreateSql();
     Piwik_Updater::updateDatabase(__FILE__, array($tables['option'] => false));
     $obsoleteDirectories = array('/plugins/AdminHome', '/plugins/Home', '/plugins/PluginsAdmin');
     foreach ($obsoleteDirectories as $dir) {
         if (file_exists(PIWIK_INCLUDE_PATH . $dir)) {
             Piwik::unlinkRecursive(PIWIK_INCLUDE_PATH . $dir, true);
         }
     }
 }
开发者ID:ntulip,项目名称:piwik,代码行数:11,代码来源:0.2.10.php

示例5: getSql

    static function getSql()
    {
        $tables = Piwik::getTablesCreateSql();
        return array($tables['option'] => false, 'ALTER IGNORE TABLE `' . Piwik::prefixTable('log_visit') . '`
				 CHANGE `location_provider` `location_provider` VARCHAR( 100 ) DEFAULT NULL' => '1054', 'ALTER TABLE `' . Piwik::prefixTable('logger_api_call') . '`
				CHANGE `parameter_names_default_values` `parameter_names_default_values` TEXT,
				CHANGE `parameter_values` `parameter_values` TEXT,
				CHANGE `returned_value` `returned_value` TEXT' => false, 'ALTER TABLE `' . Piwik::prefixTable('logger_error') . '`
				CHANGE `message` `message` TEXT' => false, 'ALTER TABLE `' . Piwik::prefixTable('logger_exception') . '`
				CHANGE `message` `message` TEXT' => false, 'ALTER TABLE `' . Piwik::prefixTable('logger_message') . '`
				CHANGE `message` `message` TEXT' => false, 'ALTER IGNORE TABLE `' . Piwik::prefixTable('site') . '`
				 CHANGE `feedburnerName` `feedburnerName` VARCHAR( 100 ) DEFAULT NULL' => '1054');
    }
开发者ID:Doluci,项目名称:tomatocart,代码行数:13,代码来源:0.2.10.php

示例6: getSql

    static function getSql($schema = 'Myisam')
    {
        $sqlarray = array('ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
				ADD `visit_goal_converted` VARCHAR( 1 ) NOT NULL AFTER `visit_total_time`' => false, 'ALTER IGNORE TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
				CHANGE `visit_goal_converted` `visit_goal_converted` TINYINT(1) NOT NULL' => false);
        $tables = Piwik::getTablesCreateSql();
        $sqlarray[$tables['log_conversion']] = false;
        $sqlarray[$tables['goal']] = false;
        $tables = Piwik::getTablesInstalled();
        foreach ($tables as $tableName) {
            if (preg_match('/archive_/', $tableName) == 1) {
                $sqlarray['CREATE INDEX index_all ON ' . $tableName . ' (`idsite`,`date1`,`date2`,`name`,`ts_archived`)'] = false;
            }
        }
        return $sqlarray;
    }
开发者ID:Gninety,项目名称:Microweber,代码行数:16,代码来源:0.2.27.php

示例7: update

	static function update()
	{
		$tables = Piwik::getTablesCreateSql();
		Piwik_Updater::updateDatabase(__FILE__, array(
			$tables['option'] => false,
		));

		Piwik_Updater::updateDatabase(__FILE__, array(
			// 0.1.7 [463]
			'ALTER IGNORE TABLE `'. Piwik::prefixTable('log_visit') .'`
				 CHANGE `location_provider` `location_provider` VARCHAR( 100 ) DEFAULT NULL' => '1054',
			// 0.1.7 [470]
			'ALTER TABLE `'. Piwik::prefixTable('logger_api_call') .'`
				CHANGE `parameter_names_default_values` `parameter_names_default_values` TEXT,
				CHANGE `parameter_values` `parameter_values` TEXT,
				CHANGE `returned_value` `returned_value` TEXT' => false,
			'ALTER TABLE `'. Piwik::prefixTable('logger_error') .'`
				CHANGE `message` `message` TEXT' => false,
			'ALTER TABLE `'. Piwik::prefixTable('logger_exception') .'`
				CHANGE `message` `message` TEXT' => false,
			'ALTER TABLE `'. Piwik::prefixTable('logger_message') .'`
				CHANGE `message` `message` TEXT' => false,
			// 0.2.2 [489]
			'ALTER IGNORE TABLE `'. Piwik::prefixTable('site') .'`
				 CHANGE `feedburnerName` `feedburnerName` VARCHAR( 100 ) DEFAULT NULL' => '1054',
		));

		$obsoleteFile = '/plugins/ExamplePlugin/API.php';
		if(file_exists(PIWIK_INCLUDE_PATH . $obsoleteFile))
		{
			@unlink(PIWIK_INCLUDE_PATH . $obsoleteFile);
		}

		$obsoleteDirectories = array(
			'/plugins/AdminHome',
			'/plugins/Home',
			'/plugins/PluginsAdmin',
		);
		foreach($obsoleteDirectories as $dir)
		{
			if(file_exists(PIWIK_INCLUDE_PATH . $dir))
			{
				Piwik::unlinkRecursive(PIWIK_INCLUDE_PATH . $dir, true);
			}
		}
	}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:46,代码来源:0.2.10.php

示例8: getSql

 static function getSql($schema = 'Myisam')
 {
     $tables = Piwik::getTablesCreateSql();
     return array('DROP TABLE IF EXISTS `' . Piwik_Common::prefixTable('option') . '`' => false, $tables['option'] => false);
 }
开发者ID:Gninety,项目名称:Microweber,代码行数:5,代码来源:0.2.13.php

示例9: Piwik_Query

<?php

Piwik_Query("ALTER TABLE `" . Piwik::prefixTable('log_visit') . "` \n\t\t\tADD `visit_goal_converted` VARCHAR( 1 ) NOT NULL AFTER `visit_total_time` ;");
$tables = Piwik::getTablesCreateSql();
Piwik_Query($tables['log_conversion']);
Piwik_Query($tables['goal']);
$allTablesInstalled = Piwik::getTablesInstalled();
foreach ($allTablesInstalled as $tableName) {
    if (preg_match('/archive_/', $tableName) == 1) {
        Piwik_Query('CREATE INDEX index_all 
				ON ' . $tableName . ' (`idsite`,`date1`,`date2`,`name`,`ts_archived`)');
    }
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:13,代码来源:0.2.27.php

示例10: update

 static function update()
 {
     $tables = Piwik::getTablesCreateSql();
     Piwik_Updater::updateDatabase(__FILE__, array($tables['option'] => false));
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:5,代码来源:0.2.10.php


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