note 104132 deleted from ref.pdo-pgsql.connection by danbrown
| From: | danbrown@php.net | Date: | Wed, 25 May 2011 15:08:36 +0000 |
| Subject: | note 104132 deleted from ref.pdo-pgsql.connection by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-180029@lists.php.net to get a copy of this message | ||
Note Submitter: lpu8er
----
@tmairs :
That's not PHP, PDO or PGSQL.
You used simple quotes, so variables are not evaluated. Correct syntax should be
<?php
$dbh = new PDO("pgsql:dbname=$dbname;
host=$host;
username=$username;
password=$password"); // or concatenate
?>
and it works.