diff options
-rw-r--r-- | db.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -5,7 +5,11 @@ require_once "config.php"; function db_connect($host, $user, $pass, $db) { if (DB_TYPE == "pgsql") { - $string = "dbname=$db user=$user password=$pass"; + $string = "dbname=$db user=$user"; + + if ($pass) { + $string .= " password=$pass"; + } if ($host) { $string .= " host=$host"; |