How can I have multiple tables without making a new editor.php file?(EditorDatatable) variable $pkey
How can I have multiple tables without making a new editor.php file?(EditorDatatable) variable $pkey
I am trying to use the editor.php for several tables but it only allows me to put the id of a table in the Editor.php file. Is it possible to use the library for several tables?

I am trying to use the editor.php for several tables but it only allows me to put the id of a table in the Editor.php file. Is it possible to use the library for several tables?
NOTE: I read the following post https://datatables.net/forums/discussion/50871/how-can-i-have-multiple-tables-without-making-a-new-editor-php-file
but I don't understand where the change should be made.
This discussion has been closed.
Replies
You can set the primary key column name using the optional third parameter for the
Editorfactory method.Allan
hi allan I want one shared file for all tables.
where do I have to put the variable to work with multiple independent tables?
I was trying this but it doesn't work
private $_pkey = array('Id_Rol','Id_slider');
File: editor.php
Don't change the
Editor.phpfile we distribute. Instead change how you initialise the Editor instance in the PHP - for example you might use:Or if you want the table name and primary key to be variables based on some other logic:
Allan