patch (from h3) to connect to PGSQL through unix socket

master
Andrew Dolgov 19 years ago
parent 6995e024ed
commit 6b3bce8abb

@ -5,7 +5,14 @@ require_once "config.php";
function db_connect($host, $user, $pass, $db) {
if (DB_TYPE == "pgsql") {
return pg_connect("host=$host dbname=$db user=$user password=$pass");
$string = "dbname=$db user=$user password=$pass";
if ($host) {
$stripng .= "host=$host";
}
return pg_connect($string);
} else if (DB_TYPE == "mysql") {
$link = mysql_connect($host, $user, $pass);

Loading…
Cancel
Save