« cubrid_fetch
cubrid_get »

cubrid_free_result

(PECL CUBRID >= 8.3.0)

cubrid_free_result — Free the memory occupied by the result data

説明

function cubrid_free_result(resource $req_identifier): bool

This function frees the memory occupied by the result data. It returns true on success or false on failure. Note that it can only frees the client fetch buffer now, and if you want free all memory, use function cubrid_close_request().

パラメータ

req_identifier

This is the request identifier.

戻り値

成功した場合に true を、失敗した場合に false を返します。

例

例1 cubrid_free_result() example

<?php
$conn = cubrid_connect("localhost", 33000, "demodb");

$req = cubrid_execute($conn, "SELECT * FROM history WHERE host_year=2004 ORDER BY event_code");
$row = cubrid_fetch_assoc($req);
var_dump($row);

cubrid_free_result($req);
cubrid_close_request($req);
cubrid_disconnect($conn);
?>

上の例の出力は以下となります。

array(5) {
  ["event_code"]=>
  string(5) "20005"
  ["athlete"]=>
  string(12) "Hayes Joanna"
  ["host_year"]=>
  string(4) "2004"
  ["score"]=>
  string(5) "12.37"
  ["unit"]=>
  string(4) "time"
}
関連キーワード:
cubrid   free   memory   occupied   Free   fetch   identifier   request   conn   frees   host   year   event   code   resource   success   failure   Note   client   buffer   want   成功   example   connect   localhost
関連する関数・ページ:
function.cubrid-lob2-close   function.cubrid-get-class-name   function.cubrid-lob2-new   function.cubrid-close-request   function.cubrid-close-prepare   function.cubrid-lob2-export