From 93f2cf9b7311f220bf255635e9cfed63eee5640f Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Thu, 2 Nov 2017 16:05:06 +0900 Subject: [PATCH] DB IO Class: if not PK auto found, set to NULL to skip return In case no primary key is set and the auto detect does not return a primary key, set the primary key variable to 'NULL' string to trigger skip in returning insert id flow. --- www/libs/Class.DB.IO.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/libs/Class.DB.IO.inc b/www/libs/Class.DB.IO.inc index 35c2f17f..4833e09a 100644 --- a/www/libs/Class.DB.IO.inc +++ b/www/libs/Class.DB.IO.inc @@ -661,7 +661,7 @@ { $this->pk_name_table[$table] = $this->db_functions->_db_primary_key($table, $schema); } - $this->pk_name = $this->pk_name_table[$table]; + $this->pk_name = $this->pk_name_table[$table] ? $this->pk_name_table[$table] : 'NULL'; } if (!preg_match("/ returning /i", $this->query) && $this->pk_name) {