(PECL CUBRID >= 8.3.0)
cubrid_unbuffered_query — Perform a query without fetching the results into memory
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.
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);
?>
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().
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant