cubrid_unbuffered_query

(PECL CUBRID >= 8.3.0)

cubrid_unbuffered_queryPerform a query without fetching the results into memory

说明

cubrid_unbuffered_query ( string $query [, resource $conn_identifier ] ) : resource

This function performs a query without waiting for that all query results have been complete. It will return when the results are being generated.

参数

query

A SQL query.

conn_identifier

The CUBRID connection. If the connection identifier is not specified, the last connection opened by cubrid_connect() is assumed.

返回值

For SELECT, SHOW, DESCRIBE or EXPLAIN statements returns a request identifier resource on success.

For other type of SQL statements, UPDATE, DELETE, DROP, etc, returns TRUE on success.

FALSE on failure.

注释

Note:

The benefits of cubrid_unbuffered_query() come at a cost: you cannot use cubrid_num_rows() and cubrid_data_seek() on a result set returned from cubrid_unbuffered_query().

范例

Example #1 cubrid_unbuffered_query() example

<?php
    $link 
cubrid_connect("localhost"30000"demodb""dba""");
    if (!
$link)
    {
        die(
'Could not connect.');
    }
    
$query "select * from code";
    
$result cubrid_unbuffered_query($query$link);

    while (
$row cubrid_fetch($result))
    {
        
var_dump($row);
    }

    
cubrid_close_request($result);
    
cubrid_disconnect($link);
?>
相关文章
php cubrid mysql 兼容性函数 return the number of rows affected by the last sql statementphp cubrid mysql 兼容性函数 return the current cubrid connection charsetphp cubrid mysql 兼容性函数 move the internal row pointer of the cubrid resultphp cubrid mysql 兼容性函数 get db name from results of cubrid list dbsphp cubrid mysql 兼容性函数 return the numerical value of the error message from previous cubrid operationphp cubrid mysql 兼容性函数 get column information from a result and return as an objectphp cubrid mysql 兼容性函数 return an array with the lengths of the values of each field from the current rowphp cubrid mysql 兼容性函数 fetch the next row and return it as an objectphp cubrid mysql 兼容性函数 return a numerical array with the values of the current rowphp cubrid mysql 兼容性函数 return a string with the flags of the given field offsetphp cubrid mysql 兼容性函数 get the maximum length of the specified fieldphp cubrid mysql 兼容性函数 return the name of the specified field indexphp cubrid mysql 兼容性函数 move the result set cursor to the specified field offsetphp cubrid mysql 兼容性函数 return the name of the table of the specified fieldphp cubrid mysql 兼容性函数 return an array with the list of all existing cubrid databasesphp cubrid mysql 兼容性函数 return the number of columns in the result setphp cubrid mysql 兼容性函数 ping a server connection or reconnect if there is no connectionphp cubrid mysql 兼容性函数 send a cubrid queryphp cubrid mysql 兼容性函数 escape special characters in a string for use in an sql statementphp cubrid mysql 兼容性函数 perform a query without fetching the results into memory
关注编程学问公众号