Browse Source

first action

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/legacy@79 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
master
akulikov 16 years ago
parent
commit
ace883d168
  1. 4
      classes/pg_DBConnector.class.php

4
classes/pg_DBConnector.class.php

@ -38,8 +38,8 @@ class DBConnector
return self::$handlers[$handler_name];
}
if (!$handler = pg_connect("host='".$db_settings['host']."' dbname='".$db_settings['database']."' user='".$db_settings['user'].'" password="'.$db_settings['password']."'")) {
throw new MJException('Can\'t connect to DB '.pg_last_error($handler), 2);
if (!$handler = pg_connect("host='".$db_settings['host']."' dbname='".$db_settings['database']."' user='".$db_settings['user']."' password='".$db_settings['password']."'")) {
throw new MJException('Can\'t connect to DB '.pg_last_error(), 2);
}
return self::$handlers[$handler_name] = $handler;

Loading…
Cancel
Save