Coding with SPIP 2.1
SPIP 2.1 Technical Documentation

> > > > sql_query

sql_query

The sql_query() function executes the query passed to it as a parameter. It is the least portable of the SQL instruction command set; it should therefore be avoided wherever possible in preference to the other more specific SQL API functions.

It accepts 3 parameters:

  1. $ins is the SQL query,
  2. $serveur,
  3. $option.

Usage:

  1. $res = sql_query('SELECT * FROM spip_meta');
  2. // but we would prefer you used this instead:
  3. $res = sql_select('*', 'spip_meta');

Download

  • Author :
  • Published :
  • Updated : 02/06/10
  • Translations : English, français