07-30-2023, 02:23 PM
$dbh = new PDO('pgsql:host=localhost;port=5432;dbname=###;user=###;password=##');
For PDO type connection uncomment
`extension=php_pdo_pgsql.dll` and comment with
`;extension=php_pgsql.dll`
$dbh = pg_connect("host=localhost dbname=### user=### password=####");
For pgconnect type connection comment
`;extension=php_pdo_pgsql.dll` and uncomment
`extension=php_pgsql.dll`
Both the connections should work.
For PDO type connection uncomment
`extension=php_pdo_pgsql.dll` and comment with
`;extension=php_pgsql.dll`
$dbh = pg_connect("host=localhost dbname=### user=### password=####");
For pgconnect type connection comment
`;extension=php_pdo_pgsql.dll` and uncomment
`extension=php_pgsql.dll`
Both the connections should work.