略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: cubrid_free_result

2024-11-15

cubrid_free_result

(PECL CUBRID >= 8.3.0)

cubrid_free_resultFree the memory occupied by the result data

说明

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"
}
add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.cubrid-free-result.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3