Only one MySQL table can be edited at a time. Queries from multiple tables with joins cannot be used as an editable feature, since SQL UPDATE and INSERT statements are generated automatically, and there currenlty is no way to update multiple tables – but this problem is being investigated and pursued.
If I have a wpDataTable which is created from a sql query (from 2 tables), and modifying a parameter from this wpDataTable frontend edition only one table be modified.
For example:
//WpDataTable 1
Select * from people p, address a where p.id = a.id ;
id | name | age | adress
1 | jhon | 40 | street 1
2 | josh | 52 | street 2
3 | kai | 36 | street 3
In this case, if I modify John´s age (from frontend edition) , and I setted it to 42...
Will be people table updated with new inserted age? (I only want people table be modified).
Our company is located in Serbia and our working time is from 10:00 to 17:00 CET. business days.
If query is made from two or more tables, editing will not work, but if You've managed to create a new table by using data from these two tables, then it should work (if that table exists as an independent table in Your database).
So, if You have two tables (People and Address), and You've created a third table using data from these two tables, then You'd be able to edit the third table, but not one of these two.
Or, You can try using foreign key. In the documentation You can see a table created from three different tables. You can also take a look at our sandbox site where You can see a live example of a table created from three different tables using foreign keys.
Whats the meaning of the next sentence?
Only one MySQL table can be edited at a time. Queries from multiple tables with joins cannot be used as an editable feature, since SQL UPDATE and INSERT statements are generated automatically, and there currenlty is no way to update multiple tables – but this problem is being investigated and pursued.
Taken from : https://wpdatatables.com/documentation/front-end-editing/creating-editable-tables/
--------------------------------------------------------------------------------------------------------------------------------
If I have a wpDataTable which is created from a sql query (from 2 tables), and modifying a parameter from this wpDataTable frontend edition only one table be modified.
For example:
In this case, if I modify John´s age (from frontend edition) , and I setted it to 42...
Will be people table updated with new inserted age? (I only want people table be modified).
This is possible? Thankss
Some help?
Hello davitx17.
Sorry for late response.
Our company is located in Serbia and our working time is from 10:00 to 17:00 CET. business days.
If query is made from two or more tables, editing will not work, but if You've managed to create a new table by using data from these two tables, then it should work (if that table exists as an independent table in Your database).
So, if You have two tables (People and Address), and You've created a third table using data from these two tables, then You'd be able to edit the third table, but not one of these two.
Please let me know if 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
Hi Aleksandar, you are talking about a view?
Hello again davitx17.
You can try creating a View, yes.
Or, You can try using foreign key. In the documentation You can see a table created from three different tables. You can also take a look at our sandbox site where You can see a live example of a table created from three different tables using foreign keys.
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