Okay
  Public Ticket #2327463
Duplicate entries
Closed

Comments

  •  2
    Srinath started the conversation

    Hello Aleksandar

    I have to assign identification numbers to employees.
    To avoid duplicate entries I added UNIQUE constraint to the column containing identification numbers -
    ALTER TABLE `dbj66npcuyxch3`.`hr_wpdatatable_14` ADD UNIQUE `din` (`din`);

    After that successfully imported over a thousand records into the table (from .sql file). But now it gives "cannot insert new row" error while trying  to create a new entry.

    This is a known issue in MySQL, but is there a work around it so that I can have the column not allow duplicate entries and the table be able to import multiple records when required?

    With Regards
    Srinath das

  •  2,513
    Aleksandar replied

    Hello again Srinath

    Have you configured that column as a Primary column in the database? And also - have you listed that column as the "ID column for editing" in the "Editing" tab above the table?

    The plugin needs to have one primary, auto-increment column so the table can be editable. Importing multiple records can be done either through the database (by importing data into the table), or selecting a range in Excel, and copying over the data in the "Excel-like editor" of wpDataTables.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables