sql_create_base

The sql_create_base() function attempts to create a database with the name provided. The function returns false if an error occurs.

It accepts 3 parameters:

  • $nom is the name of the database to create,
  • $serveur,
  • $option

This function is only used during the installation of SPIP to create a database as requested for a given database manager:

sql_create_base($sel_db, $server_db);

When using SQLite, the database name corresponds to the file name without the file type extension (.sqlite will be added automatically) and the file will be stored in the directory defined by the _DIR_DB constant, which by default is set to config/bases/.

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

Translations : English, français