cubrid_unbuffered_query
(PECL CUBRID >= 8.3.0)
cubrid_unbuffered_query — Perform a query without fetching the results into memory
Description
$query
[, resource $conn_identifier
] )This function performs a query without waiting for that all query results have been complete. It will return when the results are being generated.
Parameters
-
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.
Return Values
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.
Notes
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().
Examples
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
- cubrid_affected_rows
- cubrid_client_encoding
- cubrid_close
- cubrid_data_seek
- cubrid_db_name
- cubrid_errno
- cubrid_error
- cubrid_fetch_array
- cubrid_fetch_assoc
- cubrid_fetch_field
- cubrid_fetch_lengths
- cubrid_fetch_object
- cubrid_fetch_row
- cubrid_field_flags
- cubrid_field_len
- cubrid_field_name
- cubrid_field_seek
- cubrid_field_table
- cubrid_field_type
- cubrid_list_dbs
- cubrid_num_fields
- cubrid_ping
- cubrid_query
- cubrid_real_escape_string
- cubrid_result
- cubrid_unbuffered_query
Коментарии
404 Not Found