Firebird 2.0
PHP5 Programming
Manual

Overview of Firebird Connections

A connection signifies a specific database on a specific Firebird server. Connections can be opened and closed. The database of the connection can be created or dropped (deleted).

Syntax

<connection_function> ::=
     <connect>
   | <pconnect>
   | <connect_query>
   | <drop_db>
   | <close>



Description

The functions to deal with connections and the associated databases are:

  • connect
    This function connects to a specific database on a specific server using the specified login credentials.

  • pconnect
    This function connects to a specific database on a specific server using the specified login credentials, like connect. However, the connection will be held open at the end of the PHP script and reused at a next invocation.

  • connect_query
    A special form of the query function allows to create a new database on a server and connect to it right away.

  • drop_db
    The drop_db function takes a connection, deletes the associated database and closes the connection.

  • close
    The close function closes the connection. If the connection was created with pconnect, the close function does nothing. This allows the transparent interchangeability of connect and pconnect.

The Firebird PHP5 driver keeps the last connection made (using connect, pconnect or connect_query) as the default database connection and this connection is used as the default connection in many situations.


previous page goto index next page

Legal information