Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for tables in database other than "wordpress" #29

Open
sabandosoleda opened this issue Jan 14, 2018 · 1 comment
Open

Support for tables in database other than "wordpress" #29

sabandosoleda opened this issue Jan 14, 2018 · 1 comment

Comments

@sabandosoleda
Copy link

I noticed that when you create a table editor for a table that doesn't reside in the "wordpress" database, by passing a 'table' parameter similar to 'table' => 'myotherdb.mytable' to add_db_table_editor, the resulting table editor is able to retrieve and display the columns, but fails to save changes (insert, update, and delete). From error logs it is shown that "wordpress." is prepended to the table name, ending up with "worpress.myotherdb.mytable" which obviously doesn't exist.
It would be cool to fix this in order to support tables outside the default worpress db :)

Thank you for your nice and neat plugin btw

@bobbysmith007
Copy link
Member

There are save_cb, update_cb, and insert_cb that allow you to control how and to where a save call occurs. Currently I am using wpdb->update & wpdb->insert which are already set and connected to the wordpress database.

If you come up with something to solve this please feel free to post here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants