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


PHP cubrid_get_server_info函数代码示例

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


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

示例1: __connect

 /**
  * DB Connect
  * this method is private
  * @param array $connection connection's value is db_hostname, db_port, db_database, db_userid, db_password
  * @return resource
  */
 function __connect($connection)
 {
     // attempts to connect
     $result = @cubrid_connect($connection["db_hostname"], $connection["db_port"], $connection["db_database"], $connection["db_userid"], $connection["db_password"]);
     // check connections
     if (!$result) {
         $this->setError(-1, 'database connect fail');
         return;
     }
     if (!defined('__CUBRID_VERSION__')) {
         $cubrid_version = cubrid_get_server_info($result);
         $cubrid_version_elem = explode('.', $cubrid_version);
         $cubrid_version = $cubrid_version_elem[0] . '.' . $cubrid_version_elem[1] . '.' . $cubrid_version_elem[2];
         define('__CUBRID_VERSION__', $cubrid_version);
     }
     if (__CUBRID_VERSION__ >= '8.4.0') {
         cubrid_set_autocommit($result, CUBRID_AUTOCOMMIT_TRUE);
     }
     return $result;
 }
开发者ID:1Sam,项目名称:rhymix,代码行数:26,代码来源:DBCubrid.class.php

示例2: __connect

 /**
  * DB Connect
  * this method is private
  * @param array $connection connection's value is db_hostname, db_port, db_database, db_userid, db_password
  * @return resource
  */
 function __connect($connection)
 {
     // attempts to connect
     $result = @cubrid_connect($connection['host'], $connection['port'], $connection['database'], $connection['user'], $connection['pass']);
     // check connections
     if (!$result) {
         $this->setError(-1, 'database connect fail');
         return;
     }
     if (!defined('__CUBRID_VERSION__')) {
         $cubrid_version = cubrid_get_server_info($result);
         $cubrid_version_elem = explode('.', $cubrid_version);
         $cubrid_version = $cubrid_version_elem[0] . '.' . $cubrid_version_elem[1] . '.' . $cubrid_version_elem[2];
         define('__CUBRID_VERSION__', $cubrid_version);
     }
     if (version_compare(__CUBRID_VERSION__, '9.0', '<')) {
         $this->setError(-1, 'Rhymix requires CUBRID 9.0 or later. Current CUBRID version is ' . __CUBRID_VERSION__);
         return;
     }
     cubrid_set_autocommit($result, CUBRID_AUTOCOMMIT_TRUE);
     return $result;
 }
开发者ID:rhymix,项目名称:rhymix,代码行数:28,代码来源:DBCubrid.class.php

示例3: _version

 /**
  * Version number query string
  *
  * @access	public
  * @return	string
  */
 function _version()
 {
     // To obtain the CUBRID Server version, no need to run the SQL query.
     // CUBRID PHP API provides a function to determin this value.
     // This is why we also need to add 'cubrid' value to the list of
     // $driver_version_exceptions array in DB_driver class in
     // version() function.
     return cubrid_get_server_info($this->conn_id);
 }
开发者ID:pravinhirmukhe,项目名称:punelic,代码行数:15,代码来源:cubrid_driver.php

示例4: version

 /**
  * Database version number
  *
  * @return	string
  */
 public function version()
 {
     if (isset($this->data_cache['version'])) {
         return $this->data_cache['version'];
     } elseif (!$this->conn_id) {
         $this->initialize();
     }
     return (!$this->conn_id or ($version = cubrid_get_server_info($this->conn_id)) === FALSE) ? FALSE : ($this->data_cache['version'] = $version);
 }
开发者ID:heruprambadi,项目名称:sim_penyuratan,代码行数:14,代码来源:cubrid_driver.php

示例5: version

 /**
  * Database version number
  *
  * @return	string
  */
 public function version()
 {
     return isset($this->data_cache['version']) ? $this->data_cache['version'] : ($this->data_cache['version'] = cubrid_get_server_info($this->conn_id));
 }
开发者ID:rittidate,项目名称:sbobet-dev,代码行数:9,代码来源:cubrid_driver.php

示例6: version

 /**
  * Get this db version
  *
  * @return void
  */
 public function version()
 {
     return cubrid_get_server_info($this->link);
 }
开发者ID:ainuloverflow,项目名称:raportonline,代码行数:9,代码来源:Cubrid.php

示例7: testCubridGetServerInfo3

 /**
  * @group arnia-wrong-parameters
  */
 public function testCubridGetServerInfo3()
 {
     if (OUTPUT_FUNCTION_NAME == true) {
         echo "\r\nRunning: " . __FUNCTION__ . " = ";
     }
     try {
         $val = cubrid_get_server_info(" ");
         $this->assertTrue(FALSE, "Expected Exception not thrown.");
     } catch (Exception $e) {
         //echo $e->getMessage()."\r\n";
         $this->assertEquals(0, cubrid_error_code());
         $this->assertEquals(0, cubrid_error_code_facility());
         $this->assertEquals('', cubrid_error_msg());
     }
 }
开发者ID:CUBRID,项目名称:cubrid-php,代码行数:18,代码来源:cubrid.php

示例8: sql_server_info

function sql_server_info($link = null)
{
    if (isset($link)) {
        $result = cubrid_get_server_info($link);
    }
    if (!isset($link)) {
        $result = cubrid_get_server_info();
    }
    return $result;
}
开发者ID:BackupTheBerlios,项目名称:idb,代码行数:10,代码来源:cubrid.php

示例9: _version

 function _version()
 {
     return cubrid_get_server_info($this->conn_id);
 }
开发者ID:pepegarcia,项目名称:publicidadoficialdemo-1,代码行数:4,代码来源:cubrid_driver.php

示例10: version

 /**
  * Database version number.
  *
  * @return string
  */
 public function version()
 {
     if (isset($this->data_cache['version'])) {
         return $this->data_cache['version'];
     }
     return (!$this->conn_id or ($version = cubrid_get_server_info($this->conn_id)) === false) ? false : ($this->data_cache['version'] = $version);
 }
开发者ID:recca0120,项目名称:laraigniter,代码行数:12,代码来源:cubrid_driver.php


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