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


PHP Db::getPrefix方法代码示例

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


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

示例1: Model

 /**
  * So far, it only initializes the connection to the database, using the ADOdb API.
  */
 function Model()
 {
     $this->Object();
     $this->_db =& Db::getDb();
     // fetch the database prefix
     $this->_prefix = Db::getPrefix();
     $this->_db->debug = DAO_DEBUG_ENABLED;
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:11,代码来源:model.class.php

示例2: ConfigDbStorage

 /**
  * Connects to the database using the parameters in the config file.
  *
  */
 function ConfigDbStorage($params = null)
 {
     // initialize the connection
     $this->_db =& Db::getDb();
     // get the prefix
     $this->_dbPrefix = Db::getPrefix();
     // and finally, load the whole data
     $this->_loadData();
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:13,代码来源:configdbstorage.class.php

示例3: PluginRecentTrackbacks

 function PluginRecentTrackbacks()
 {
     $this->PluginBase();
     $this->id = "recenttrackbacks";
     $this->author = "Mark Wu";
     $this->desc = "This plugin offers the most recently article trackbacks.";
     $this->prefix = Db::getPrefix();
     $this->locales = array("en_UK", "zh_TW", "zh_CN", "es_ES");
     $this->init();
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:10,代码来源:pluginrecenttrackbacks.class.php

示例4: PluginTopReadPosts

 function PluginTopReadPosts()
 {
     $this->PluginBase();
     $this->id = "topreadposts";
     $this->author = "Mark Wu";
     $this->desc = "This plugin offers the rank list of articles by number of read.";
     $this->prefix = Db::getPrefix();
     $this->locales = array("en_UK", "zh_TW", "zh_CN");
     $this->init();
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:10,代码来源:plugintopreadposts.class.php

示例5: PluginArticleReferers

 function PluginArticleReferers()
 {
     $this->PluginBase();
     $this->id = "articlereferers";
     $this->author = "Mark Wu";
     $this->desc = "This plugin offers you to get the referers of the specific article.";
     $this->prefix = Db::getPrefix();
     $this->locales = array("en_UK", "zh_TW", "zh_CN");
     $this->init();
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:10,代码来源:pluginarticlereferers.class.php

示例6: PluginTopCommentVisitors

 function PluginTopCommentVisitors()
 {
     $this->PluginBase();
     $this->id = "topcommentvisitors";
     $this->author = "Mark Wu";
     $this->desc = "This plugin offers the rank list of visitors by number of comments.";
     $this->prefix = Db::getPrefix();
     $this->db =& Db::getDb();
     $this->locales = array("en_UK", "zh_TW", "zh_CN");
     $this->init();
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:11,代码来源:plugintopcommentvisitors.class.php

示例7: _checkTables

 /**
  * @private
  */
 function _checkTables()
 {
     // create the table to keep track of the voters, so that people cannot vote
     // more than once
     $fields = "\r\n\t\t\t      id I(10) NOTNULL PRIMARY AUTOINCREMENT,\r\n\t\t\t      recipients TEXT NOTNULL DEFAULT '',\n\t\t\t      recipients_cc TEXT NOTNULL DEFAULT '',\n\t\t\t      recipients_bcc TEXT NOTNULL DEFAULT '',\r\n\t\t\t      subject C(255) NOTNULL DEFAULT '',\r\n\t\t\t      body XL NOTNULL DEFAULT '',\r\n\t\t\t\t  date T(14) DEFDATE\r\n\t\t\t\t  ";
     $db =& Db::getDb();
     $dbPrefix = Db::getPrefix();
     $tableName = $dbPrefix . "mailcentre_sent";
     // create the data dictionary and create the table if necessary
     $dict = NewDataDictionary($db);
     $sqlArray = $dict->ChangeTableSQL($tableName, $fields);
     $result = $dict->ExecuteSQLArray($sqlArray);
     if (!$result) {
         die("There was an error creating the plugin tables!");
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:20,代码来源:pluginmailcentre.class.php

示例8: _verifyTable

 function _verifyTable()
 {
     $fields = "\n      id I(11) NOTNULL PRIMARY AUTOINCREMENT,\n      blogId I(11) NOTNULL KEY,\n      active C(1) NOTNULL KEY,\n      subject TEXT NOTNULL,\n      responses TEXT NOTNULL,\n      responsedata TEXT NOTNULL,\n      dateadded I(11) NOTNULL";
     $fields2 = "\n      id I(11) NOTNULL KEY,\n      ip I8 NOTNULL KEY,\n      date I(11) NOTNULL KEY";
     $db =& Db::getDb();
     $dbPrefix = Db::getPrefix();
     $tableName = $dbPrefix . "plogpoll_polls";
     $tableName2 = $dbPrefix . "plogpoll_voterips";
     $dict = NewDataDictionary($db);
     $sqlAry = $dict->ChangeTableSQL($tableName, $fields);
     $result = $dict->ExecuteSQLArray($sqlAry);
     if (!$result) {
         die("There was an error creating/updating plogpoll plugin tables!");
     }
     $sqlAry = $dict->ChangeTableSQL($tableName2, $fields2);
     $result = $dict->ExecuteSQLArray($sqlAry);
     if (!$result) {
         die("There was an error creating/updating plogpoll plugin tables!");
     }
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:20,代码来源:pluginplogpoll.class.php

示例9: perform

 function perform()
 {
     $this->_userName = $this->_request->getValue("userName");
     $this->_userPassword = $this->_request->getValue("userPassword");
     $this->_confirmPassword = $this->_request->getValue("userPasswordCheck");
     $this->_userEmail = $this->_request->getValue("userEmail");
     $this->_userFullName = $this->_request->getValue("userFullName");
     $db = connectDb();
     if (!$db) {
         $this->_view = new WizardView("step3");
         $this->_view->setErrorMessage("There was an error connecting to the database. Please check your settings.");
         $this->setCommonData();
         return false;
     }
     if ($this->_confirmPassword != $this->_userPassword) {
         $this->_view = new WizardView("step3");
         $this->_form->setFieldValidationStatus("userPasswordCheck", false);
         $this->setCommonData(true);
         return false;
     }
     $dbPrefix = Db::getPrefix();
     $users = new Users();
     $user = new UserInfo($this->_userName, $this->_userPassword, $this->_userEmail, "", $this->_userFullName);
     $userId = $users->addUser($user);
     if (!$userId) {
         $this->_view = new WizardView("step3");
         $message = "There was an error adding the user. Make sure that the user does not already exist in the database (" . $users->DbError() . ")";
         $this->_view->setErrorMessage($message);
         $this->setCommonData();
         return false;
     }
     // we also have to execute the code to give administrator privileges to this user
     $query = "INSERT INTO {$dbPrefix}users_permissions(user_id,blog_id,permission_id) VALUES( {$userId}, 0, 1 );";
     $db->Execute($query);
     $this->_view = new Wizardview("step4");
     $this->_view->setValue("ownerid", $userId);
     $this->_view->setValue("siteLocales", Locales::getLocales());
     $this->_view->setValue("defaultLocale", Locales::getDefaultLocale());
     $ts = new TemplateSets();
     $this->_view->setValue("siteTemplates", $ts->getGlobalTemplateSets());
     $this->setCommonData();
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:43,代码来源:wizard.php

示例10: bb2_read_settings

function bb2_read_settings()
{
    include_once PLOG_CLASS_PATH . "class/database/db.class.php";
    include_once PLOG_CLASS_PATH . "class/config/config.class.php";
    $config =& Config::getConfig();
    $prefix = Db::getPrefix();
    $displayStats = $config->getValue('bb2_display_stats', true);
    $verbose = $config->getValue('bb2_verbose', false);
    $isInstalled = $config->getValue('bb2_installed', false);
    $logging = $config->getValue('bb2_logging', false);
    return array('log_table' => $prefix . 'bad_behavior', 'display_stats' => $displayStats, 'verbose' => $verbose, 'logging' => $logging, 'is_installed' => $isInstalled);
}
开发者ID:aunderwo,项目名称:sobc,代码行数:12,代码来源:bad-behavior-lifetype.php

示例11: __construct

 public function __construct(Db $db, Shop $shop)
 {
     $this->db = $db;
     $this->shop = $shop;
     $this->db_prefix = $db->getPrefix();
 }
开发者ID:prestashop,项目名称:ps_linklist,代码行数:6,代码来源:LinkBlockRepository.php


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