I seem to have encountered a bug related to how wpdt works in computational formulas.
Here is the error message:
There was an error when trying to get cell value. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1-wpdatatable_4.`wdtcolumn`)/wpdatatable_4.`wdtcolumn`) as formula_1 FROM wpdata' at line 1%
Some of them are disabled for security reasons while others simply don't work with the PHP SQL parser that we use. Unfortunately, wpDataTables is not a database management plugin so it can't perform the same as phpMyAdmin, or other database management tools.
You can try preparing a MySQL view (which will return the data that you need, call it e.g. “view1” and then build a wpDataTables based on a simple query like "SELECT * FROM view1″.
1. Create table with formula column at the end of the table. Then created a line chart that calls the said formula column. This failed with sql syntax error.
2. Create same table without formula column. Instead of putting formulas, I did computations in excel and took the resulting figures and included those figures in the last column of the table. Then I did the line graph again, this time the graph came up with no error.
3. Create the table with formula column then create a view for the table. Then I went on creating the chart, got same sql syntax error.
I think there is a bug related to the formula especially when the formula includes division of a colum value by another column value.
I can't replicate this locally. Formula columns added to charts do not cause them to break on my end, so can you please tell me/show me what the table looks like and what the formula looks like, so I can try replicating it?
I've tried using multiple formulas that not only included column divisions, but also multiplications, and nested formulas (secondary formula column which included the first formula, with some additional data for the second formula).
Does this happen for manual tables also, or only SQL tables?
Hi,
I seem to have encountered a bug related to how wpdt works in computational formulas.
Here is the error message:
Regards,
Kessy
Hello Kessy.
Our logic is based on a PHP SQL parser which has full support for the SQL dialect for the following statement types
SELECT, INSERT, UPDATE, DELETE, REPLACE, RENAME, SHOW, SET, DROP, CREATE INDEX, CREATE TABLE, EXPLAIN, and DESCRIBE.
Some of them are disabled for security reasons while others simply don't work with the PHP SQL parser that we use. Unfortunately, wpDataTables is not a database management plugin so it can't perform the same as phpMyAdmin, or other database management tools.
You can try preparing a MySQL view (which will return the data that you need, call it e.g. “view1” and then build a wpDataTables based on a simple query like "SELECT * FROM view1″.
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
Hi Aleksandar,
I tried the following options:
1. Create table with formula column at the end of the table. Then created a line chart that calls the said formula column. This failed with sql syntax error.
2. Create same table without formula column. Instead of putting formulas, I did computations in excel and took the resulting figures and included those figures in the last column of the table. Then I did the line graph again, this time the graph came up with no error.
3. Create the table with formula column then create a view for the table. Then I went on creating the chart, got same sql syntax error.
I think there is a bug related to the formula especially when the formula includes division of a colum value by another column value.
Regards,
Kessy
Hi again Kessy.
I can't replicate this locally. Formula columns added to charts do not cause them to break on my end, so can you please tell me/show me what the table looks like and what the formula looks like, so I can try replicating it?
I've tried using multiple formulas that not only included column divisions, but also multiplications, and nested formulas (secondary formula column which included the first formula, with some additional data for the second formula).
Does this happen for manual tables also, or only SQL tables?
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
Hi Aleksandar
I decided to use google sheets as source of data for the table instead of the manual table.
This works well.
Thanks for your time and response.
Regards,
Kessy
Thanks for letting me know, Kessy.
Let me know if there's anything else I can do to help.
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