sql_selectdb

The sql_selectdb() function is used to select a connection to a database server that offers a database for use. The function returns true of the operation is successful, otherwise it returns false.

The sql_selectdb() function has 3 parameters:

  1. $nom being the name of the database to use,
  2. $serveur,
  3. $option.

This function is used by SPIP during the installation routine to try to pre-select the name of the database to be used, by means of attempting to select a database with the same name as the login.

  1. $test_base = $login_db;
  2. $ok = sql_selectdb($test_base, $server_db);

Download

Author Mark Baber Published : Updated : 02/06/10

Translations : English, français