dblayer : add a exception if the provided PDO driver is not known
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2050 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -160,6 +160,9 @@ class dblayer extends PDO
|
||||
$this->exec("SET NAMES 'utf8'");
|
||||
$this->sep = "\"";
|
||||
break;
|
||||
default:
|
||||
throw new Exception (dgettext("domframework",
|
||||
"Unknown PDO driver provided"), 500);
|
||||
}
|
||||
$this->dsn = $dsn;
|
||||
}
|
||||
@@ -416,7 +419,8 @@ class dblayer extends PDO
|
||||
$select = array ();
|
||||
if ($updatekey !== false)
|
||||
{
|
||||
if ($columns === $this->primary)
|
||||
// This line have a problem to update a tuple with the same values
|
||||
// if ($columns === $this->primary)
|
||||
$select[] = array ($this->primary, $updatekey, "!=");
|
||||
}
|
||||
$select[] = array ($columns, $after[$columns]);
|
||||
|
||||
Reference in New Issue
Block a user