sql table with 3 fields building the index
sql table with 3 fields building the index
Hi,
I have no choice with a table as it is generated by 3rd party-software. This table has tons of fields and three of them form the index together.
Those fields are:
[INP_ID] ASC,
[Stapelname] ASC,
[SUB_ID] ASC,
I tried with
Editor::inst( $db, 'V_Positionen', 'INP_ID', 'Stapelname', 'SUB_ID')
but at the moment when I edit sonethind in datatables/editor, i get the message "Cannot insert duplicate key "; if I delete a row, all of them are deleted.
How do I set the index correct?
Thanks
Max
This question has an accepted answers - jump to answer
Answers
Pass your compound key data in as an array. Refer the docs:
https://editor.datatables.net/manual/nodejs/getting-started#Compound-keys
thank you!!