So I'm trying to combine the functionality which ensures users can only see their own data, whilst also having a related table used for lookup/pulling information from multiple sources. So I've got two MySQL tables, Table A and Table B. I've got a JOIN query to select data from each, which works fine.
However, I'd like to have the users able to update just Table B and I can't seem to get that functionality to work, how should I go about setting the connections/queries/tables up? I can't seem to get the out-of-the-box functionality to work together as explained in the documentation.
So I have Table A: Property Information fields (Link, Image, Price, Post Code)
I have Table B: Post-code Lookup (Post Code, Address)
Combined into wpDataTable C: (Link, Image, Price, Post Code -> Address Editable Drop-down Field)
No matter how I configure, it doesn't seem to i) Correctly populate the Address options with those corresponding to that Post Code, ii) Correctly save edits.
**Edit: uninstalling and re-installing fixed the following: Even with a stripped-back example, on table https://www.reagency.co.uk/wp-table-test/ I can't seem to make any edits stick.
The below issues relating to Foreign Keys, User Edits, Drop-down Edits still apply.
However, I am not sure how you've created this table. You're mentioning using JOIN through the query, but then mention Foreign Keys as well.
Edit works when I try it out on your table - I can enter a new row, and edit it without issues.
Like mentioned in our documentation, though, 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.
So I'm trying to combine the functionality which ensures users can only see their own data, whilst also having a related table used for lookup/pulling information from multiple sources. So I've got two MySQL tables, Table A and Table B. I've got a JOIN query to select data from each, which works fine.
However, I'd like to have the users able to update just Table B and I can't seem to get that functionality to work, how should I go about setting the connections/queries/tables up? I can't seem to get the out-of-the-box functionality to work together as explained in the documentation.
So I have Table A: Property Information fields (Link, Image, Price, Post Code)
I have Table B: Post-code Lookup (Post Code, Address)
Combined into wpDataTable C: (Link, Image, Price, Post Code -> Address Editable Drop-down Field)
No matter how I configure, it doesn't seem to i) Correctly populate the Address options with those corresponding to that Post Code, ii) Correctly save edits.
**Edit: uninstalling and re-installing fixed the following:
Even with a stripped-back example, on table https://www.reagency.co.uk/wp-table-test/ I can't seem to make any edits stick.
The below issues relating to Foreign Keys, User Edits, Drop-down Edits still apply.
Hi Jon
I see edits wok fine, so that's good news.
However, I am not sure how you've created this table. You're mentioning using JOIN through the query, but then mention Foreign Keys as well.
Edit works when I try it out on your table - I can enter a new row, and edit it without issues.
Like mentioned in our documentation, though, 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
**moved to new ticket since it's not directly related to this.
Got it, Jon
I'll check it our right away.
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