FBIRD_DROP_DB
Purpose
Use the fbird_drop_db function to permanently
remove a database from the server.
Syntax
<drop_db> ::= fbird_drop_db(
conn_hndl )
Element
|
Type
|
Description
|
conn_hndl
|
resource
|
A valid connection handle
|
<return>
|
bool
|
True on success, False on failure
|
Semantics
This function permanently wipes out a database,
erasing its data, metadata, and all of its supporting files, such as
secondary files and shadow files. To succeed there must be no other
connections to this database, not from PHP and not from non-PHP
clients.
The database is identified by a connection handle,
as returned from fbird_connect or fbird_pconnect. In order to
succeed, the user credentials used for this connection must be of
SYSDBA or of the owner (creator) of this database.
This function would typically be used to remove a
temporary database. It returns True if it succesfully removed the
database, and False if it failed. As a side effect, the connection
handle is closed.
Example
The below example drops database 'mydb.fdb':
$conn = fbird_open('mydb.fdb',
'sysdba',
'masterkey'); if ((fbird_drop_db($conn)) == True) { echo 'Database deleted'; } else { echo
'Deletion failed. Other connections active?'; }
See also
fbird_connect
|