PHP + MYSQL insert data check repeated PHP + MYSQL insert data check whether repeated data is imported from excel others newly imported may be imported with existing data duplicated PHP-ExcelReader ------ solution ------------------ modify the data table: set fields that you think may have repeated fields as "UNIQUE" indexes to avoid repeated PHP + MYSQL data insertion check
PHP + MYSQL insert data check whether repeated data is imported from excel. others may use PHP-ExcelReader to import new data.
------ Solution --------------------
Just modify the data table:
Set the fields that you think may already exist as "UNIQUE" indexes to avoid repeated fields.
------ Solution --------------------
Select count (*) from tbl_name group by does not allow repeated fields
If the result is greater than 1, it indicates that there are duplicates.
------ Solution --------------------
The filename field in the table already contains duplicate data. An error occurred while creating the unique index.