fix column_data_explode or update $col => array() gives SQL error

writing it now as NULL (or "" if column is NOT NULL)
This commit is contained in:
Ralf Becker 2019-03-03 15:13:44 +01:00
parent 7b2a82a771
commit fb31d08aba

View File

@ -1567,7 +1567,7 @@ class Db
$maxlength = in_array($column_definitions[$col]['type'], array('varchar','ascii')) ? $column_definitions[$col]['precision'] : null;
}
// dont use IN ( ), if there's only one value, it's slower for MySQL
if (is_array($data) && count($data) == 1)
if (is_array($data) && count($data) <= 1)
{
$data = array_shift($data);
}