1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-12 17:14:16 +02:00

* fixed odbc_num_rows and pg_affected_rows

This commit is contained in:
David Grudl
2007-08-23 17:12:58 +00:00
parent 05b8c0ad43
commit 7f995a558b
12 changed files with 172 additions and 102 deletions

View File

@@ -40,11 +40,13 @@ class DibiPdoDriver extends DibiDriver
*/
public function __construct($config)
{
if (!extension_loaded('pdo'))
if (!extension_loaded('pdo')) {
throw new DibiException("PHP extension 'pdo' is not loaded");
}
if (empty($config['dsn']))
if (empty($config['dsn'])) {
throw new DibiException("DSN must be specified (driver odbc)");
}
if (empty($config['username'])) $config['username'] = NULL;
if (empty($config['password'])) $config['password'] = NULL;
@@ -70,8 +72,9 @@ class DibiPdoDriver extends DibiDriver
if ($res === FALSE) return FALSE;
if ($res instanceof PDOStatement)
if ($res instanceof PDOStatement) {
return new DibiPdoResult($res);
}
return TRUE;
}