Update import_xlsx.modules.php
This commit is contained in:
parent
86c4bb23ad
commit
d41908e52a
@ -651,6 +651,9 @@ class ImportXlsx extends ModeleImports
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// We have a last INSERT ID. Check if we have a row referencing this foreign key.
|
// We have a last INSERT ID. Check if we have a row referencing this foreign key.
|
||||||
|
// This is required when updating table with some extrafields. When inserting a record in parent table, we can make
|
||||||
|
// a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record
|
||||||
|
// may already exists. So we rescan the extrafield table to be know if record exists or not for the rowid.
|
||||||
$sqlSelect = 'SELECT rowid FROM '.$tablename;
|
$sqlSelect = 'SELECT rowid FROM '.$tablename;
|
||||||
|
|
||||||
if(empty($keyfield)) $keyfield = 'rowid';
|
if(empty($keyfield)) $keyfield = 'rowid';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user