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:
-#
$nom
being the name of the database to use,
-#
$serveur
,
-#
$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.
$test_base = $login_db;
$ok = sql_selectdb($test_base, $server_db);