Title: Save to multiple databases??
Last modified: August 20, 2016

---

# Save to multiple databases??

 *  [nkrasinski](https://wordpress.org/support/users/nkrasinski/)
 * (@nkrasinski)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/save-to-multiple-databases/)
 * So, here is the situation. I have a wordpress multisite where i am collecting
   my form data and saving to the database. I have a second wordpress multisite 
   install where I would like to display the collected forms from the 1st site. 
   Is there a way to write to two databases or is there some other easy way for 
   me to grab the data to display on another site??
    I tried messing around with
   reading the database into the 2nd site using a new instance of wpdb; which I 
   could get, but I was having a hard time displaying my data since each form submission
   is not a single database entry, but rather several entries. Is there an easier
   way to do this?
 * [http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/](http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [wpleao](https://wordpress.org/support/users/wpleao/)
 * (@wpleao)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/save-to-multiple-databases/#post-3340610)
 * same issue hier!
    I am using MULTISITE with several forms. For each site, to 
   access the data saved on the contact form DB database TABLE, the problem is that
   all forms are stored in the same table. Maybe shortcode can help when you want
   to JOIN all data from diferent forms or tables in one query. Or you can try create
   your own query with SQL statements, using the JOIN SQL key manipulating the WPDB
   wordpress native queries, inside a PAGE TEMPLATE. Now i ask if is possible a 
   shorcode inside a Page or page template to delete data from contactDB tables (
   not on admin page, deletes are already implemented on wordpress admin). Or if
   is possible use ajax to create my own datagrid to use on pages or pages templates
   or something like that. Maybe this is already done with the payed extensions ,
   but we are a poor comunity working for social benefits, but from now money is
   always a big problem for us. sorry my bad english. Great plugin, wonderfull and
   great person Michael Simpson, Thanks for all. Jorge
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/save-to-multiple-databases/#post-3340611)
 * To to clear, I have never tried to make the plugin work with multisite. I have
   never run a multisite to try the plugin there. I don’t have a clear understanding
   of how multisite works internally. Consequently I don’t know enough to tell you
   how to make this work on a multisite.
 * If all the data is saved in only one table across all sub-sites then short codes
   should still work. The only problem would be that every sub-site owner has access
   to all the data, includes that from other sub-sites. I will need to look into
   understanding how to save the data in a different DB table for each sub-site.
   If anyone can help be understand that, I would appreciate it.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Save to multiple databases??’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-to-database-extension_ffffff.
   svg)
 * [Contact Form DB](https://wordpress.org/plugins/contact-form-7-to-database-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-to-database-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/save-to-multiple-databases/#post-3340611)
 * Status: not resolved