Looking for field list
Looking for field list
Hello everybody,
I am new to datatables and I'm struggling to get the Editor plugin to work with my MySQL Table.
I just changed the Parameters of the inline-editing example with tab control (Config, PHP-File, ans JS ), and everything looks correct, but I'm getting this Error: <<DataTables warning: table id=generalexpenses - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'field list'>>
I changed the "examples" table in the JS with my "generalexpenses" table and I don't have an 'id' field (neither in JS nor in PHP script). I don't know how to find this field list.
Can somebody tell me where can I find it?
Answers
The third parameter of the Editor PHP class constructor can be used to set the primary key column name of the table. By default it is
id. See: https://editor.datatables.net/manual/php/getting-started#Basic-initialisationAllan
This might be more useful as well: http://editor.datatables.net/docs/Editor-1.3.1/php/class-DataTables.Editor.html
Allan
Thank you very much Allan.
I just renamed my primary key column to "id" and it worked like a charm :)