本文整理汇总了PHP中db2_server_info函数的典型用法代码示例。如果您正苦于以下问题:PHP db2_server_info函数的具体用法?PHP db2_server_info怎么用?PHP db2_server_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了db2_server_info函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCurrentSchema
/**
* {@inheritDoc}
*/
public function getCurrentSchema()
{
if (!$this->isConnected()) {
$this->connect();
}
$info = db2_server_info($this->resource);
return isset($info->DB_NAME) ? $info->DB_NAME : '';
}
示例2: getQuoteIdentifierSymbol
/**
* @return string
*/
public function getQuoteIdentifierSymbol()
{
$this->_connect();
$info = db2_server_info($this->_connection);
$identQuote = $info->IDENTIFIER_QUOTE_CHAR;
return $identQuote;
}
示例3: getServerVersion
/**
* Retrieve server version in PHP style
*
* @return string
*/
public function getServerVersion()
{
$this->_connect();
$server_info = db2_server_info($this->_connection);
if ($server_info !== false) {
$version = $server_info->DBMS_VER;
if ($this->_isI5) {
$version = (int) substr($version, 0, 2) . '.' . (int) substr($version, 2, 2) . '.' . (int) substr($version, 4);
}
return $version;
} else {
return null;
}
}
示例4: getServerVersion
/**
* @return string Version information from the database
*/
public function getServerVersion()
{
$info = db2_server_info($this->mConn);
return $info->DBMS_VER;
}
示例5: quoteIdentifier
/**
* Quotes an identifier.
*
* @param string $ident The identifier.
*
* @return string The quoted identifier.
*/
public function quoteIdentifier($string)
{
$info = db2_server_info($this->_connection);
$identQuote = $info->IDENTIFIER_QUOTE_CHAR;
return $identQuote . $string . $identQuote;
}
示例6: getDbInfo
public function getDbInfo()
{
$this->getDatabase();
$server = @db2_server_info($this->database);
if (is_object($server)) {
$server = get_object_vars($server);
} else {
$server = null;
}
$client = @db2_client_info($this->database);
if (is_object($client)) {
$client = get_object_vars($client);
} else {
$client = null;
}
return array("IBM DB2 Client Info" => $client, "IBM DB2 Server Info" => $server);
}
示例7: getSchema
public function getSchema()
{
$server = db2_server_info($this->_db->getConnection());
return $server->DB_NAME;
}
示例8: server_version
/**
* This function returns the version string.
*
* @access public
* @author Thorsten Rinne <thorsten@phpmyfaq.de>
* @since 2005-04-16
*/
function server_version()
{
$server = db2_server_info($this->conn);
$ver = $server->DBMS_NAME . ' ' . $server->DBMS_VER;
return $ver;
}
示例9: getPrimaryKey
public static function getPrimaryKey($table, $conn, $dbtype)
{
/**
* Discover metadata information about this table.
*/
$server_info = db2_server_info($conn);
// $server_info->DBMS_NAME == "QSQ" is iSeries / i5
if ($server_info->DBMS_NAME == "QSQ") {
$sql = "SELECT column_name as colname FROM qsys2.syskeycst ";
$sql .= "WHERE system_table_name = '" . $table . "' and ordinal_position > 0 order by ordinal_position asc";
} else {
$sql = "SELECT colname FROM SYSCAT.COLUMNS WHERE TABNAME = '" . $table . "' AND KEYSEQ > 0 ORDER BY KEYSEQ ASC";
}
$rs = self::query($conn, $sql);
if ($rs) {
$res = self::fetch_num($rs);
self::closeCursor($rs);
if ($res) {
return $res[0];
}
}
return false;
}