postgre fix
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@87 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -38,10 +38,10 @@ 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;
|
||||
}
|
||||
|
||||
@ -82,9 +82,9 @@ class DBConnector
|
||||
return pg_num_rows($result);
|
||||
}
|
||||
|
||||
static public function affectedRows($handler)
|
||||
static public function affectedRows($handler, $result)
|
||||
{
|
||||
return pg_affected_rows($handler);
|
||||
return pg_affected_rows($result);
|
||||
}
|
||||
|
||||
static public function getId($handler)
|
||||
|
Reference in New Issue
Block a user