This could be done only if you enable the "Users view and edit only own data". You would need to create a new integer column, and when you enable editing, set that column to be the User ID column:
You can display the user's user name if you create an SQL query based table which would pull the data from wp_users table, and then connect the User ID with the first table, but display the username instead of ID using Foreign Keys.
Yeah, you could use this on an existing MySQL table, you simply need to add the userid column.
You can connect the tables using foreign key function, of course.
Also, to be able to use this for an existing table, you would need to add the userid to existing rows manually, and please note that this is sort of a package deal - if you enable this - users will be able to see and edit only the rows associated with their userid.
Is it possible to record which wordpress user has edited a row by writing to a column cell?
Source table is from MySQL.
Hello fergalom
This could be done only if you enable the "Users view and edit only own data". You would need to create a new integer column, and when you enable editing, set that column to be the User ID column:
You can display the user's user name if you create an SQL query based table which would pull the data from wp_users table, and then connect the User ID with the first table, but display the username instead of ID 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
Thanks Aleksandar,
So I would not be able to apply this to an exisitng MySQL database table?
All users have access and can edit any row of this table currently in wpDatatables.
So this cannot function the way I would like?
I want to write the wp_userid back to Mysql table if the user edits a row in table
Hi again fergalom.
Yeah, you could use this on an existing MySQL table, you simply need to add the userid column.
You can connect the tables using foreign key function, of course.
Also, to be able to use this for an existing table, you would need to add the userid to existing rows manually, and please note that this is sort of a package deal - if you enable this - users will be able to see and edit only the rows associated with their userid.
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