FrontBase Funciones
PHP Manual

fbsql_create_db

(PHP 4 >= 4.0.6, PHP 5)

fbsql_create_dbCreate a FrontBase database

Descripción

bool fbsql_create_db ( string $database_name [, resource $link_identifier [, string $database_options ]] )

Attempts to create a new database on the specified server.

Parámetros

database_name

The database name, as a string.

link_identifier

Un identificador de enlace FrontBase devuelto por fbsql_connect() o fbsql_pconnect().

Es opcional y si no se especifica, la función intentará encontrar un enlace abierto al servidor FrontBase y de no encontrarse ningún enlace abierto intentará crear uno como si fbsql_connect() fuese invocada sin parámetros.

database_options

Valores devueltos

Devuelve TRUE en caso de éxito o FALSE en caso de error.

Ejemplos

Example #1 fbsql_create_db() example

<?php
$link 
fbsql_pconnect("localhost""_SYSTEM""secret")
    or die(
"Could not connect");
if (
fbsql_create_db("my_db")) {
    echo 
"Database created successfully\n";
} else {
    
printf("Error creating database: %s\n"fbsql_error());
}
?>

Ver también


FrontBase Funciones
PHP Manual