The sql_free()
function is used to release an SQL resource opened using a call to the sql_select()
function. Ideally this function ought to be called after finishing using each resource.
It accept 3 parameters:
-
$res
is the resource for a selection, -
$serveur
, -
$option
.
The sql_free()
function is therefore used as shown below:
$res = sql_select('column', 'table');
// operations using the sql_fetch($res) and similar functions ...
// then close the resource
sql_free($res);
Note that the API functions call this function automatically. This is the case for:
-
sql_fetsel
(andsql_getfetsel
), -
sql_fetch_all
(andsql_allfetsel
), -
sql_in_select
.