odbc_free_result

bool odbc_free_result(resource result) 

Frees query memory.

Returns:

Always returns TRUE

Description:

Frees any memory associated with the result identifier. odbc_free_result() is a paranoia measure when you want to free the memory associated with your result identifier before the script has finished. The memory is cleared when the script is finished anyway. If you have odbc_autocommit() disabled, any pending transactions are rolled back when odbc_free_result() is called.

Version:

Existing since version 3.0.6

Example:

Free query memory
$db = odbc_connect("DSN","user","pass"); 
$result = odbc_exec($db,"SELECT * FROM Products ORDER BY ProductName"); 
odbc_free_result($result); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.