I have a table which has a portion of the Select using CONCAT to combine first and last names together. I set the CONCAT'ed column as read only, but whenever I try to edit any portion of the table it gives me an error
-------
"Error! There was an error trying to update the row! Error: 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 'FIRST`,` = Christian Johnston - Johnston Piano Service , `SERIAL` = 'P180102D002' at line 1"
-------
Is there a way to make it so that read only fields / columns do not attempt to be updated when there is an edit made?
From what I understand, you set the column's Editor Input Type to none, correct?
That shouldn't be an issue here. But, could you please show me how the query looks like?
Also, if your MySQL-query based wpDataTable doesn’t work correctly with server-side processing, probably this is happening because wpDataTables server has problems with parsing of the query and building new queries dynamically (rarely happens, but does sometimes). To avoid this please prepare a MySQL view (a stored query), which will return the data that you need, call it e.g. “view1” and then build a wpDataTabled based on a simple query like “SELECT * FROM view1″.
I had the column's Editor Input Type set to none, but it was still acting weird.
I created the view (which really simplified things in many ways) and that is working great. Thank you for the response and I am sorry it took me so long to test it / get back in touch with you.
I have a table which has a portion of the Select using CONCAT to combine first and last names together. I set the CONCAT'ed column as read only, but whenever I try to edit any portion of the table it gives me an error
-------
"Error! There was an error trying to update the row! Error: 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 'FIRST`,` = Christian Johnston - Johnston Piano Service , `SERIAL` = 'P180102D002' at line 1"
-------
Is there a way to make it so that read only fields / columns do not attempt to be updated when there is an edit made?
Hello Kenneth.
Thank you for your purchase.
From what I understand, you set the column's Editor Input Type to none, correct?
That shouldn't be an issue here. But, could you please show me how the query looks like?
Also, if your MySQL-query based wpDataTable doesn’t work correctly with server-side processing, probably this is happening because wpDataTables server has problems with parsing of the query and building new queries dynamically (rarely happens, but does sometimes). To avoid this please prepare a MySQL view (a stored query), which will return the data that you need, call it e.g. “view1” and then build a wpDataTabled based on a simple query like “SELECT * FROM view1″.
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
Hello Aleksandar,
I had the column's Editor Input Type set to none, but it was still acting weird.
I created the view (which really simplified things in many ways) and that is working great. Thank you for the response and I am sorry it took me so long to test it / get back in touch with you.
Kenny
HI Kenny,
Glad to hear that Aleksandar help you out and I hope that everythign will work fine now.
If you have any more issues feel free to open a new ticket.
Best regards.
Kind Regards,
Miloš Jovanović
[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