한국어 Login Register

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

cubrid_free_result

Description

The cubrid_free_result() function is used to free the memory occupied by the result data.

Note The cubrid_free_result() function can only frees the client fetch buffer now, and if you want free all memory occupied by the result data, use function cubrid_close_request().

Syntax

bool cubrid_free_result ( resource $result )

Return Value
  • Success : TRUE
  • Failure : FALSE
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);

?>

 

The above example will output:

 

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"

}