From 19966c094cc9a7958eb30e0a5a63bd66ce005c97 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Fri, 19 Sep 2014 12:22:20 +0000 Subject: [PATCH] dblayer : force the autoincrement values in INSERT to be compliant with our tests git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1841 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- dblayer.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dblayer.php b/dblayer.php index 455378a..15c3439 100644 --- a/dblayer.php +++ b/dblayer.php @@ -462,6 +462,11 @@ class dblayer extends PDO throw new Exception (dgettext("domframework", "The datas provided to create are not array"), 405); + foreach ($this->fields as $key=>$params) + { + if (in_array ("autoincrement", $params)) + $datas[$key] = null; + } if (!in_array ($this->primary, $this->unique)) $this->unique[] = $this->primary; $datasOK = array ();