note 97699 modified in ref.pdo-pgsql.connection by danbrown
| From: | danbrown@php.net | Date: | Tue, 04 May 2010 14:17:48 +0000 |
| Subject: | note 97699 modified in ref.pdo-pgsql.connection by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-168928@lists.php.net to get a copy of this message | ||
The DSN syntax shown here did not work for me, but this did:
<?php
$dbh = new PDO("pgsql:dbname=$dbname;host=$host", $username, $password );
?>
As opposed to
<?php
$dbh = new PDO('pgsql:dbname=$dbname;
host=$host;
username=$username;
password=$password');
?>
Which makes sense and is more PGSQL standard.
--was--
The DSN syntax shown here did not work for me, but this did:
$dbh = new PDO("pgsql:dbname=$dbname;host=$host", $username, $password );
As opposed to
$dbh = new PDO('pgsql:dbname=$dbname;
host=$host;
username=$username;
password=$password');
Which makes sense and is more PGSQL standard.
http://php.net/manual/en/ref.pdo-pgsql.connection.php