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:

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

Author Mark Baber Published : Updated : 12/03/23

Translations : English, français