So, I understand you're trying to join 3 manual tables? Are "tab1", "tab2" and "tab3" really the names of the tables in your database?
Try adding another "UNION ALL" at the end of the query, and see if that works. If it doesn't work, please note there's a limitation with editing multiple SQL tables - 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 currently is no way to update multiple tables.
(SELECT user_id, user_email, tel FROM tab1 UNION ALL SELECT user_id, user_email, tel FROM tab2 UNION ALL SELECT user_id, user_email, tel FROM tab3) t1;
Hello,
I created a table manually. then i created another table combined with the manual one with "Create a table linked to an existing data source".
How can i show that table to a specific log in users to show them only their rows ?
i followed instructions from : https://wpdatatables.com/documentation/front-end-editing/allowing-users-to-edit-only-their-own-data/
But it works only for manual table. it is not working with the table type "Create a table linked to an existing data source".
i use sql query :
SELECT user_id, user_email, tel FROM tab1
UNION ALL
SELECT user_id, user_email, tel FROM tab2
UNION ALL
SELECT user_id, user_email, tel FROM tab3;
it is not working with UNION ALL. (to show a specific row from user_id log in)
Hello Amine
Thank you for your purchase.
So, I understand you're trying to join 3 manual tables? Are "tab1", "tab2" and "tab3" really the names of the tables in your database?
Try adding another "UNION ALL" at the end of the query, and see if that works. If it doesn't work, please note there's a limitation with editing multiple SQL tables - 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 currently is no way to update multiple 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
Hello Aleksandar,
i tried this query and it works perfectly.
SELECT * FROM
(SELECT user_id, user_email, tel FROM tab1
UNION ALL
SELECT user_id, user_email, tel FROM tab2
UNION ALL
SELECT user_id, user_email, tel FROM tab3) t1;
Now users can see only their rows :)
Ah, great news Amine
Thanks for letting me know.
If you have any further questions or issues, 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