Is there a way to access table data without calling the entire datatable? I'd like to have a Wordpress page display only relevant data that I select outside of the table (like I would with a post type). Otherwise this is no different from a spreadsheet. I couldn't find this anywhere in the documentation, plus I found there is no access to the data via the REST API so I can't go in that way either.
If you have created a manual table, or you're simply pulling the data from an existing table in the database, you can create them using SQL queries.
Depending on the contents of the table, you can create them by pulling either all data like:
SELECT * FROM my_table
Or just like SQL - use custom queries to get the desired data. For example:
SELECT * from date_table
WHERE date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR)
Or:
SELECT name,
lastname,
userid,
email
FROM my_table
WHERE userid BETWEEN '3' AND '17'
Whatever works in PHPMyAdmin (database in general) should work in wpDataTables.
However, there are some limitations when it comes to complex queries. For example using multiple JOIN and CONCAT functions may cause search and filters not to function properly.
Please take a look at our documentation - this can all be done from within the plugin's back-end, if you choose the first option to create a table, then select SQL query, and build it there.
Ok, that is fine and I've already got that but I'm actually after this in reverse. I want to be able to query the wpdatatable from something else within the Wordpress instance. I've done it with some code and Google Sheets (can easily switch to wpdatatables as a source) anyway. I assumed that was the purpose of this plugin, might have been wrong.
Is there a way to access table data without calling the entire datatable? I'd like to have a Wordpress page display only relevant data that I select outside of the table (like I would with a post type). Otherwise this is no different from a spreadsheet. I couldn't find this anywhere in the documentation, plus I found there is no access to the data via the REST API so I can't go in that way either.
Cheers
Dean
Hello Dean.
Thank you for your purchase.
If you have created a manual table, or you're simply pulling the data from an existing table in the database, you can create them using SQL queries.
Depending on the contents of the table, you can create them by pulling either all data like:
Or just like SQL - use custom queries to get the desired data. For example:
Or:
Whatever works in PHPMyAdmin (database in general) should work in wpDataTables.
However, there are some limitations when it comes to complex queries. For example using multiple JOIN and CONCAT functions may cause search and filters not to function properly.
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
Is this doable from Wordpress directly or will I need to write my own function?
Hello Dean.
Please take a look at our documentation - this can all be done from within the plugin's back-end, if you choose the first option to create a table, then select SQL query, and build it there.
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
Ok, that is fine and I've already got that but I'm actually after this in reverse. I want to be able to query the wpdatatable from something else within the Wordpress instance. I've done it with some code and Google Sheets (can easily switch to wpdatatables as a source) anyway. I assumed that was the purpose of this plugin, might have been wrong.
I understand, Dean.
Unfortunately that's not how it works.
If you have any other issues or questions, though, please feel free to open a new ticket and we'll gladly help.
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