Forum und email

fbsql_db_status

(PHP 4 >= 4.0.7, PHP 5)

fbsql_db_status — Restituisce lo stato di un dato database.

Descrizione

int fbsql_db_status ( string $database_name [, resource $link_identifier ] )

Restituisce: un valore intero con lo stato corrente.

fbsql_db_status() richiede lo stato corrente del database specificato da database_name . Se il link_identifier viene omesso verrà usato quello in uso.

Il valore restituito potrà essere uno delle seguenti costanti:

  • FALSE - L'exec handler del host era invalido. Questo errore si presenta quando la connessione avviene direttamente al database, tramite il link_identifier, usando un numero di porta. FBExec può essere disponibile sul server ma nessuna connessione è stata creata.
  • FBSQL_UNKNOWN - Lo stato è sconosciuto.
  • FBSQL_STOPPED - Il database non è attivo. Usare fbsql_start_db() per attivare il database.
  • FBSQL_STARTING - Il database è in fase di attivazione.
  • FBSQL_RUNNING - Il database è attivo e può essere usato per eseguire operazioni SQL.
  • FBSQL_STOPPING - Il database é in fase di disattivazione.
  • FBSQL_NOEXEC - FBExec non è attivo sul server quindi non è possibile conoscere lo stato del database.

Vedere anche: fbsql_start_db() e fbsql_stop_db().