diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index c1b7bdd487c..245eb650990 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -889,7 +889,7 @@ class DoliDBMysqli extends DoliDB $i++; } } - $sql .= implode(',', $sqlfields); + $sql .= implode(', ', $sqlfields); if ($primary_key != "") { $sql .= ",".$pk; } diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 71ba5f5279a..0a32d49325e 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -1127,7 +1127,7 @@ class DoliDBPgsql extends DoliDB $i++; } } - $sql .= implode(',', $sqlfields); + $sql .= implode(', ', $sqlfields); if ($primary_key != "") { $sql .= ",".$pk; } diff --git a/test/phpunit/DoliDBTest.php b/test/phpunit/DoliDBTest.php index adafc6a676c..e2af4b7071c 100644 --- a/test/phpunit/DoliDBTest.php +++ b/test/phpunit/DoliDBTest.php @@ -66,11 +66,11 @@ class DoliDBTest extends CommonClassTest $res = $db->DDLDropTable($namedic); $columns = array( - 'rowid' => array('type' => 'integer', 'value' => 11, 'AUTO_INCREMENT PRIMARY KEY'), + 'rowid' => array('type' => 'integer', 'AUTO_INCREMENT PRIMARY KEY'), 'code' => array('type' => 'varchar', 'value' => 255, 'null'=>'NOT NULL'), 'label' => array('type' => 'varchar', 'value' => 255, 'null'=>'NOT NULL'), - 'position' => array('type' => 'integer', 'value' => 11, 'null'=>'NULL'), - 'use_default' => array('type' => 'varchar', 'value' => 11, 'default'=>'1'), + 'position' => array('type' => 'integer', 'null'=>'NULL'), + 'use_default' => array('type' => 'varchar', 'value' => 1, 'default'=>'1'), 'active' => array('type' => 'integer', 'value' => 3) ); $primaryKey = 'rowid';