How to write in the mysql field unique values? If given:
privet
privet
privet
... others
Need to write (unique by adding a hyphen and numbers)
privet
privet-1
privet-2
....
Tell me how to more effectively implement in php?
What are the options?
Another option: if the table field before insertion is generally empty. (can process everything in an array, and then write it once to the database?)
The assumption to search and select each time SELECT.
but it seems there will be a lot of search operations ... especially on "big data" and this will affect the performance
idfield with auto increment. Insert records without any checks, and when reading you make the concatenation of the required field with theidfield and with a hyphen between them. What is the reason that the record should be in one field? - uorypm