Subject | Re: [firebird-php] PDO extension |
---|---|
Author | marius adrian popa |
Post date | 2011-05-23T17:52:56Z |
On Mon, May 23, 2011 at 6:36 PM, John & Carole <fuentelucas@...> wrote:
$str_conn="firebird:host=localhost;dbname=/var/lib/firebird/2.5/data/employee.fdb;charset=UTF8";
$connection = new PDO($str_conn, "sysdba", "masterkey");
$sql = 'select count(*) from employee';
$count = $connection->query($sql);
print_r ($count->fetch());
https://gist.github.com/987151
> I've attempted to load the above (for a firebird2.1 & PHP5.3.2Something is wrong with connection string here is the proper way
> combination running on ubuntu 10.04), but I'm unable to peraude it to
> work. While the following code opens the database:
>
> $str_conn="firebird:dbname=localhost:/var/lib/firebird/2.1/data/cricket.fdb";
> $dbh = ibase_connect($str_conn, "firebird", "******", "UTF8");
>
> this does not:
>
> $dbh = new PDO($str_conn, "firebird", "******", "UTF8");
$str_conn="firebird:host=localhost;dbname=/var/lib/firebird/2.5/data/employee.fdb;charset=UTF8";
$connection = new PDO($str_conn, "sysdba", "masterkey");
$sql = 'select count(*) from employee';
$count = $connection->query($sql);
print_r ($count->fetch());
https://gist.github.com/987151