I need to create a table from a large mysql table. I have no issues connecting the table and seeing the data. However, my query right now is just "Select * From Table1", which returns too much data and causes the table to load too slowly. The goal of this is to then filter by a single date in a date column, which brings down the results to a manageable number, and creates a table pulling all rows with the corresponding date value from the mysql database table.
Is there any way for me to set up a table in wpDataTables so that the table is only created when a date is selected in the filter field (Somehow dynamically query the mysql table with something like "Select * From Table1 where DATE = selected_filter_date). If no date is selected, I don't want the table to run at all.
I am kind of stumped on this, not exactly sure how to go about achieving this. Any help would be appreciated.
"I need to create a table from a large mysql table. I have no issues connecting the table and seeing the data. However, my query right now is just "Select * From Table1", which returns too much data and causes the table to load too slowly. The goal of this is to then filter by a single date in a date column, which brings down the results to a manageable number, and creates a table pulling all rows with the corresponding date value from the mysql database table."
- If table is load slowly I suggest you to enable Server-side processing feature. Server-side processing stands for the type of tables when all the data interaction operations (searching, filtering, switching pages, sorting) aren’t done by your site visitor’s browser (with JS), but by MySQL server on your site instead. Please take a look at this link from our documentation to read more about Server-side processing - Link.
"Is there any way for me to set up a table in wpDataTables so that the table is only created when a date is selected in the filter field (Somehow dynamically query the mysql table with something like "Select * From Table1 where DATE = selected_filter_date). If no date is selected, I don't want the table to run at all."
- Unfortunately something like that is not possible out of the box, but something similar like that could be done with some custom coding. Not to create new wpDataTable dynamically when user select date from date filter than to show/hide table on filter interaction.
Hello,
I need to create a table from a large mysql table. I have no issues connecting the table and seeing the data. However, my query right now is just "Select * From Table1", which returns too much data and causes the table to load too slowly. The goal of this is to then filter by a single date in a date column, which brings down the results to a manageable number, and creates a table pulling all rows with the corresponding date value from the mysql database table.
Is there any way for me to set up a table in wpDataTables so that the table is only created when a date is selected in the filter field (Somehow dynamically query the mysql table with something like "Select * From Table1 where DATE = selected_filter_date). If no date is selected, I don't want the table to run at all.
I am kind of stumped on this, not exactly sure how to go about achieving this. Any help would be appreciated.
Thank you!
Hi jensenb1190,
Thank you for the purchase.
"I need to create a table from a large mysql table. I have no issues connecting the table and seeing the data. However, my query right now is just "Select * From Table1", which returns too much data and causes the table to load too slowly. The goal of this is to then filter by a single date in a date column, which brings down the results to a manageable number, and creates a table pulling all rows with the corresponding date value from the mysql database table."
- If table is load slowly I suggest you to enable Server-side processing feature. Server-side processing stands for the type of tables when all the data interaction operations (searching, filtering, switching pages, sorting) aren’t done by your site visitor’s browser (with JS), but by MySQL server on your site instead. Please take a look at this link from our documentation to read more about Server-side processing - Link.
"Is there any way for me to set up a table in wpDataTables so that the table is only created when a date is selected in the filter field (Somehow dynamically query the mysql table with something like "Select * From Table1 where DATE = selected_filter_date). If no date is selected, I don't want the table to run at all."
- Unfortunately something like that is not possible out of the box, but something similar like that could be done with some custom coding. Not to create new wpDataTable dynamically when user select date from date filter than to show/hide table on filter interaction.