I see the wpdatatables plugin parses the sql request I've put and generates the list of columns with some parameters which I can configure via interface.
Is there any way to rebuild this list and fill with some pre-defined value of parameters in case I have a view which can return different number of columns on each request (has a pivot select inside)?
Yes, you can do this by using either placeholders or Foreign Keys. Every column you'd like to be added automatically has to have a unique auto-increment ID, so the plugin knows where to pull the data from, and where to apply it.
You can take a look at the example in our Foreign Keys part of the documentation, to see how a single table was created by using foreign keys from three different tables.
Hello,
I see the wpdatatables plugin parses the sql request I've put and generates the list of columns with some parameters which I can configure via interface.
Is there any way to rebuild this list and fill with some pre-defined value of parameters in case I have a view which can return different number of columns on each request (has a pivot select inside)?
Regards,
Vladimir
Hello Vladimir.
Yes, you can do this by using either placeholders or Foreign Keys. Every column you'd like to be added automatically has to have a unique auto-increment ID, so the plugin knows where to pull the data from, and where to apply it.
You can take a look at the example in our Foreign Keys part of the documentation, to see how a single table was created by using foreign keys from three different tables.
I hope this helps.
Best regards.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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