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


PHP cubrid_close_request函数代码示例

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


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

示例1: free_result

 function free_result()
 {
     if (is_resource($this->result_id) || get_resource_type($this->result_id) == "Unknown" && preg_match('/Resource id #/', strval($this->result_id))) {
         cubrid_close_request($this->result_id);
         $this->result_id = FALSE;
     }
 }
开发者ID:pepegarcia,项目名称:publicidadoficialdemo-1,代码行数:7,代码来源:cubrid_result.php

示例2: check_table_existence

function check_table_existence($conn_handle, $table_name)
{
    $sql_stmt = "SELECT class_name FROM db_class WHERE class_name = ?";
    $cubrid_req = cubrid_prepare($conn_handle, $sql_stmt);
    if (!$cubrid_req) {
        return -1;
    }
    $cubrid_retval = cubrid_bind($cubrid_req, 1, $table_name);
    if (!$cubrid_req) {
        cubrid_close_request($cubrid_req);
        return -1;
    }
    $cubrid_retval = cubrid_execute($cubrid_req);
    if (!$cubrid_retval) {
        cubrid_close_request($cubrid_req);
        return -1;
    }
    $row_num = cubrid_num_rows($cubrid_req);
    if ($row_num < 0) {
        cubrid_close_request($cubrid_req);
        return -1;
    }
    cubrid_close_request($cubrid_req);
    if ($row_num > 0) {
        return 1;
    } else {
        return 0;
    }
}
开发者ID:CUBRID,项目名称:cubrid-php,代码行数:29,代码来源:until.php

示例3: values

#!/usr/bin/php

<?php 
$sql = "insert into foo1 values(1,1)";
for ($i = 0; $i < 1; $i++) {
    $con = @cubrid_connect("test-db-server", 33113, "testdb", "dba", "");
    if ($con) {
        $req = cubrid_query($sql, $con);
        if ($req) {
            echo "cubrid_query error";
        }
        while ($row = cubrid_fetch($req)) {
            echo "to: \$ row [0], b: \$ row [1] \\ n";
        }
        if ($req) {
            cubrid_close_request($req);
        }
        cubrid_disconnect($con);
    } else {
        echo "failed cubrid_connect . \\ n ";
        sleep(1);
    }
}
开发者ID:CUBRID,项目名称:cubrid-php,代码行数:23,代码来源:prepare_error.php

示例4: free

 public static function free($handle = null)
 {
     cubrid_close_request($handle);
 }
开发者ID:Avantians,项目名称:Textcube,代码行数:4,代码来源:Adapter.php

示例5: free_result

 /**
  * Free the result.
  *
  * @return null
  */
 public function free_result()
 {
     if (is_resource($this->result_id) || get_resource_type($this->result_id) == 'Unknown' && preg_match('/Resource id #/', strval($this->result_id))) {
         cubrid_close_request($this->result_id);
         $this->result_id = false;
     }
 }
开发者ID:gocanto,项目名称:gocanto-pos,代码行数:12,代码来源:cubrid_result.php

示例6: isColumnExists

 /**
  * Check column exist status of the table
  * @param string $table_name table name
  * @param string $column_name column name
  * @return boolean
  */
 function isColumnExists($table_name, $column_name)
 {
     $query = sprintf("select \"attr_name\" from \"db_attribute\" where " . "\"attr_name\" ='%s' and \"class_name\" = '%s%s'", $column_name, $this->prefix, $table_name);
     $result = $this->_query($query);
     if (cubrid_num_rows($result) > 0) {
         $output = TRUE;
     } else {
         $output = FALSE;
     }
     if ($result) {
         cubrid_close_request($result);
     }
     return $output;
 }
开发者ID:1Sam,项目名称:rhymix,代码行数:20,代码来源:DBCubrid.class.php

示例7: header

<?php

include_once "connect.inc";
header('Content-type: text/html; charset=euc-kr');
//var_dump($connect_url);
$conn = cubrid_connect_with_url($connect_url);
$sql = "SELECT a from foo";
$result = cubrid_execute($conn, $sql);
$pResult = cubrid_fetch($result);
echo $pResult[0];
echo "<br/>";
cubrid_close_request($result);
cubrid_rollback($conn);
cubrid_disconnect($conn);
开发者ID:CUBRID,项目名称:cubrid-php,代码行数:14,代码来源:test.php

示例8: results

 /**
  * Get multiple records
  *
  * @param string $query The sql query
  * @param string $type return data type option. the default is "object"
  */
 public function results($query, $returnType = false)
 {
     $return = false;
     if ($returnType) {
         $this->returnType = $returnType;
     }
     if (is_null($query)) {
         $query = $this->command();
     }
     $result = $this->query($query);
     if ($this->returnType == 'object') {
         while ($row = cubrid_fetch_object($result, $this->instantiateClass)) {
             $return[] = $row;
         }
         cubrid_close_request($result);
         return $return;
     }
     if ($this->returnType == 'iterator') {
         return $result;
     }
     if ($this->returnType == 'array') {
         while ($row = cubrid_fetch_assoc($result)) {
             $return[] = $row;
         }
         cubrid_close_request($result);
         return $return;
     }
     return $return;
 }
开发者ID:ainuloverflow,项目名称:raportonline,代码行数:35,代码来源:Cubrid.php

示例9: tearDown

 protected function tearDown()
 {
     if ($this->error_flag) {
         echo "Req:" . $this->req;
         echo "Error Code: ", cubrid_error_code();
         echo "Error Facility: ", cubrid_error_code_facility();
         echo "Error Message: ", cubrid_error_msg();
     }
     if ($this->req) {
         cubrid_close_request($this->req);
     }
     if ($this->con) {
         cubrid_disconnect($this->con);
     }
     if (VERBOSE_OUTPUT == true) {
         echo "\r\nCleanup completed.";
     }
 }
开发者ID:CUBRID,项目名称:cubrid-php,代码行数:18,代码来源:cubrid.php

示例10: results

 /**
  * Get multiple records
  *
  * @param string $query The sql query
  * @param string $type return data type option. the default is "object"
  */
 public function results($query, $type = 'object')
 {
     if (is_null($query)) {
         $query = $this->command();
     }
     $result = $this->query($query);
     while ($row = cubrid_fetch_object($result, $this->instantiateClass)) {
         if ($type == 'array') {
             $return[] = (array) $row;
         } else {
             $return[] = $row;
         }
     }
     cubrid_close_request($result);
     if (!isset($return)) {
         return false;
     }
     return $return;
 }
开发者ID:ferdhika31,项目名称:males,代码行数:25,代码来源:Cubrid.php

示例11: sql_free_result

function sql_free_result($result)
{
    $fresult = cubrid_free_result($result);
    if ($fresult === false) {
        output_error("SQL Error: " . sql_error(), E_USER_ERROR);
        return false;
    }
    $fresult = cubrid_close_request($result);
    if ($fresult === false) {
        output_error("SQL Error: " . sql_error(), E_USER_ERROR);
        return false;
    }
    if ($fresult === true) {
        return true;
    }
}
开发者ID:BackupTheBerlios,项目名称:idb,代码行数:16,代码来源:cubrid.php

示例12: isColumnExists

 /**
  * @brief 특정 테이블의 column의 정보를 return
  **/
 function isColumnExists($table_name, $column_name)
 {
     $query = sprintf("select * from db_attribute where attr_name ='%s' and class_name = '%s%s'", $column_name, $this->prefix, $table_name);
     $result = $this->_query($query);
     if (cubrid_num_rows($result) > 0) {
         $output = true;
     } else {
         $output = false;
     }
     if ($result) {
         cubrid_close_request($result);
     }
     return $output;
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:17,代码来源:DBCubrid.class.php


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