Coding with SPIP 2.1
SPIP 2.1 Technical Documentation

> > > > sql_free

sql_free

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:

  1. $res is the resource for a selection,
  2. $serveur,
  3. $option.

The sql_free() function is therefore used as shown below:

  1. $res = sql_select('column', 'table');
  2. // operations using the sql_fetch($res) and similar functions ...
  3. // then close the resource
  4. sql_free($res);

Download

Note that the API functions call this function automatically. This is the case for:

  • sql_fetsel (and sql_getfetsel),
  • sql_fetch_all (and sql_allfetsel),
  • sql_in_select.
  • Author :
  • Published :
  • Updated : 01/06/10
  • Translations : English, français