dblayeroo: update check the unique columns. Allow string with comma separated values or array

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3875 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-08-02 12:49:51 +00:00
parent 7fefe0220a
commit 9af6d7402d

View File

@@ -2583,7 +2583,13 @@ class dblayeroo
if ($update)
{
// Can not update multiple UNIQUE rows with the same value
$cols = explode (",", $columns);
if (is_string ($columns))
$cols = explode (",", $columns);
elseif (is_array ($columns))
$cols = $columns;
else
$this->DBException (dgettext ("domframework",
"Unique def is not a string or an array"));
foreach ($cols as $col)
{
if (!key_exists ($col, $setValues))