Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 | 



cubrid_unbuffered_query

Description

The cubrid_unbuffered_query function sends a specified single query to the server without fetching the result row or buffering as cubrid_execute() does. This keeps considerable amount of memory occupied by SQL statements that produce large result sets and enables work on the result set immediately after the first row has been retrieved; in other words, it does not need to wait until execution of SQL statement is complete.

The optional argument ink_identifier must be specified in multiple connection environment.

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

Syntax

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

  • query : A SQL query
  • link_identifier : The CUBRID connection. If the connection identifier is not specified, the last link opened by cubrid_connect() is used.
Return Value
  • Success : TRUE
  • Failure : FALSE
Example

< ?php

$result = cubrid_unbuffered_query("INSERT INTO mytable (product) values ('kossu')", $link);

if (!$result) {

echo 'Could not run query: ' .cubrid_error_msg();

exit;

}

printf("Last inserted record has id %d ", cubrid_insert_id());

?>