(PECL PDO_FIREBIRD >= 0.1.0)
PDO_FIREBIRD DSN — Connecting to Firebird and Interbase databases
The PDO_FIREBIRD Data Source Name (DSN) is composed of the following elements:
The DSN prefix is firebird:
.
The name of the database.
The character set.
The SQL role name.
Example #1 PDO_FIREBIRD DSN examples
The following example shows a PDO_FIREBIRD DSN for connecting to Firebird and Interbase databases:
firebird:dbname=DATABASE.GDE
jon at 3blooms dot net (2013-03-27 12:15:28)
A more complete description of the PDO DSN for accessing a remote server instance of Firebird:
firebird:dbname=hostname/port:database_name
Example:
firebird:dbname=localhost/3050:C:\PKS4\Data\testdb.fdb
Of course, properly escape the backslashes in the database file path, or use a single-quoted string.
nelson at integrasoftware dot com dot br (2007-11-18 15:24:59)
my Firebird connection example:
$str_conn = "firebird:dbname=C:\db\banco.gdb;host=localhost";
$dbh = new PDO($str_conn, "SYSDBA", "masterkey");