UNB Components Code Reference

UnbDatabase::Open method

Opens a database connection.

public function UnbDatabase::Open ($connectData = null);

Parameters

connectData  –  optional, default: null

(array) Database connection configuration array containing the following items:
* 'driver' = PDO driver to be used ('mysql', 'pgsql' or 'sqlite')
* 'dsn' = DSN string (only with ODBC)
* 'hostname' = Database server hostname (not with SQLite)
* 'port' = Database server port number (optional; not with SQLite)
* 'unix-socket' = Database server UNIX socket (optional; only with MySQL, not with hostname/port)
* 'dbname' = Database name (not with SQLite)
* 'username' = Connection login username (not with SQLite)
* 'password' = Connection login password (not with SQLite)
* 'filename' = Database filename, relative to this file (only with SQLite)
* 'schema' = Database schema name (only with pgsql)
* 'synchronous' = Disk synchronisation mode (optional; 'OFF', 'NORMAL' or 'FULL'; only with SQLite)
* 'table-prefix' = Table name prefix (optional)

Exceptions thrown

InvalidArgumentException No description available.
UnbDatabaseException No description available.
PDOException No description available.

Member of class: UnbDatabase

Implementation file: database.class.php, line 146

© 2011 Yves Goergen. UNB Components Homepage. Reference generated on 2011-02-06.