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


PHP PMA_DBI_connect函数代码示例

本文整理汇总了PHP中PMA_DBI_connect函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_DBI_connect函数的具体用法?PHP PMA_DBI_connect怎么用?PHP PMA_DBI_connect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: PMA_replication_connect_to_master

/**
 * This function provides connection to remote mysql server
 *
 * @param String $user - mysql username
 * @param String $password - password for the user
 * @param String $host - mysql server's hostname or IP
 * @param int $port - mysql remote port
 * @param String $socket - path to unix socket
 * 
 * @return mixed $link mysql link on success
 */
function PMA_replication_connect_to_master($user, $password, $host = null, $port = null, $socket = null)
{
    $server = array();
    $server["host"] = $host;
    $server["port"] = $port;
    $server["socket"] = $socket;
    // 5th parameter set to true means that it's an auxiliary connection
    // and we must not go back to login page if it fails
    return PMA_DBI_connect($user, $password, false, $server, true);
}
开发者ID:dingdong2310,项目名称:g5_theme,代码行数:21,代码来源:replication.inc.php

示例2: PMA_DBI_connect

     }
 }
 // end if
 $bkp_track_err = @ini_set('track_errors', 1);
 // Try to connect MySQL with the control user profile (will be used to
 // get the privileges list for the current user but the true user link
 // must be open after this one so it would be default one for all the
 // scripts)
 if ($cfg['Server']['controluser'] != '') {
     $dbh = PMA_DBI_connect($cfg['Server']['controluser'], $cfg['Server']['controlpass']);
 }
 // end if ... else
 // Pass #1 of DB-Config to read in master level DB-Config will go here
 // Robbat2 - May 11, 2002
 // Connects to the server (validates user's login)
 $userlink = PMA_DBI_connect($cfg['Server']['user'], $cfg['Server']['password']);
 if (empty($dbh)) {
     $dbh = $userlink;
 }
 // Pass #2 of DB-Config to read in user level DB-Config will go here
 // Robbat2 - May 11, 2002
 @ini_set('track_errors', $bkp_track_err);
 unset($bkp_track_err);
 /**
  * SQL Parser code
  */
 require_once './libraries/sqlparser.lib.php';
 /**
  * SQL Validator interface code
  */
 require_once './libraries/sqlvalidator.lib.php';
开发者ID:Apxe,项目名称:Rubin_final,代码行数:31,代码来源:common.lib.php

示例3: PMA_DBI_connect

     echo '</tr>';
 }
 echo '</table> </div>';
 /**
  * connecting the source and target servers
  */
 if ('rmt' == $_SESSION['src_type']) {
     $src_link = PMA_DBI_connect($src_username, $src_password, $is_controluser = false, $_SESSION['src_server']);
 } else {
     $src_link = $GLOBALS['userlink'];
     // working on current server, so initialize this for tracking
     // (does not work if user defined current server as a remote one)
     $GLOBALS['db'] = $_SESSION['src_db'];
 }
 if ('rmt' == $_SESSION['trg_type']) {
     $trg_link = PMA_DBI_connect($trg_username, $trg_password, $is_controluser = false, $_SESSION['trg_server']);
 } else {
     $trg_link = $GLOBALS['userlink'];
     // working on current server, so initialize this for tracking
     $GLOBALS['db'] = $_SESSION['trg_db'];
 }
 /**
  * Displaying the queries.
  */
 echo '<h5>' . $GLOBALS['strQueriesExecuted'] . '</h5>';
 echo '<div id="serverstatus" style = "overflow: auto; width: 1050px; height: 180px; 
      border-left: 1px gray solid; border-bottom: 1px gray solid; padding: 0px; margin: 0px"> ';
 /**
  * Applying all sorts of differences for each matching table       
  */
 for ($p = 0; $p < sizeof($matching_tables); $p++) {
开发者ID:fathitarek,项目名称:cop5725-dbms-project,代码行数:31,代码来源:server_synchronize.php


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