downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

PDO_FIREBIRD DSN> <PDO_DBLIB DSN
Last updated: Fri, 13 Nov 2009

view this page in

Firebird/Interbase Functions (PDO_FIREBIRD)

Introdução

Aviso

Este módulo é EXPERIMENTAL. O comportamento desta extensão — incluindo o nome de suas funções e qualquer outra documentação sobre esta extensão — poderá mudar sem aviso em futuras versões do PHP. Esta extensão deve ser usada por sua própria conta e risco.

PDO_FIREBIRD is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to Firebird and Interbase databases.

Constantes pré-definidas

As constantes abaixo são definidas por este driver, e somente estarão disponíveis quando esta extensão for compilada no PHP ou carregada dinamicamente em tempo de execução. Em adição, estas constantes especificas do drive somente devem ser usadas se você estive usando este drive. Usar atributos especificos do mysql com o driver postgree pode resultar em um funcionamento não esperado. PDO::getAttribute() deve ser usado para obter o atributo PDO_ATTR_DRIVER_NAME para se certificar do driver, se o seu código puder ser usado com vários drivers.

PDO::FB_ATTR_DATE_FORMAT (integer)

Available since PHP 5.3.0.

Sets the date format.

PDO::FB_ATTR_TIME_FORMAT (integer)

Sets the time format.

Available since PHP 5.3.0.

PDO::FB_ATTR_TIMESTAMP_FORMAT (integer)

Sets the timestamp format.

Available since PHP 5.3.0.

Índice



PDO_FIREBIRD DSN> <PDO_DBLIB DSN
Last updated: Fri, 13 Nov 2009
 
add a note add a note User Contributed Notes
Firebird/Interbase (PDO)
mark-php at vectrex dot org dot uk
03-Jun-2007 08:15
If you have a database alias on the server "localhost" called "test.fdb", you can do:

$conn = new PDO("firebird:dbname=localhost:test.fdb",
                'SYSDBA','letmein');

Note that as of the time of writing, the Firebird driver doesn't correctly throw an exception on connection error

http://bugs.php.net/bug.php?id=41522
Darren
08-Mar-2006 11:18
After much trial and error i found out you should use the following to connect to a firebird database:
<?php
  $db
= new PDO ("firebird:dbname=localhost:C:\\path\\to\\database\\MyDatabase.FDB", "username", "password");
?>
NOTE: in the 1st part of the connection string there can be NO spaces else you will get NULL.
The string provided on this site does not work and will give no error only NULL.
thomas at last-it dot de
04-Feb-2006 11:52
if youre dsn syntax is wrong, see ritsaert's comment, there maybe no errormessage!
ritsaert at continuit dot nl
19-Dec-2005 12:43
The connection string for a firebird PDO connection is different than described above. It is something like:

$DB = new PDO("firebird:dbname=T:\\Klimreg.GDB", "SYSDBA", "masterkey");

after dbname= the default connection string for Interbase and Firebird databases is used as presented to either gds32.dll or fbclient.dll.

PDO_FIREBIRD DSN> <PDO_DBLIB DSN
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites