本文整理汇总了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;
}
}
示例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;
}
}
示例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);
}
}
示例4: free
public static function free($handle = null)
{
cubrid_close_request($handle);
}
示例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;
}
}
示例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;
}
示例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);
示例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;
}
示例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.";
}
}
示例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;
}
示例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;
}
}
示例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;
}