From 9af6d7402d07a714a85bb24cc918f2632f2b14f6 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 2 Aug 2017 12:49:51 +0000 Subject: [PATCH] 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 --- dblayeroo.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dblayeroo.php b/dblayeroo.php index 600a93e..ef8663e 100644 --- a/dblayeroo.php +++ b/dblayeroo.php @@ -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))