Title: WordPress database error on INSERT
Last modified: August 22, 2016

---

# WordPress database error on INSERT

 *  Resolved [RiaanPie](https://wordpress.org/support/users/riaanpie/)
 * (@riaanpie)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-insert/)
 * Hi there.
 * When I try and push the information from a custom form into the database I get
   the following feedback in my browser:
 * `WordPress database error Table xxxxxxx_cf7dbplugin_st' doesn't exist for query
   INSERT INTO xxxxxxxx_cf7dbplugin_st`
 * This is a new one for me as what I built has been working all along. Update to
   newest version didn’t fix this for me. I tried to search for where this table
   is referenced but couldnt find anything.
 * Hope you can help me.
 * [https://wordpress.org/plugins/contact-form-7-to-database-extension/](https://wordpress.org/plugins/contact-form-7-to-database-extension/)

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

 *  Thread Starter [RiaanPie](https://wordpress.org/support/users/riaanpie/)
 * (@riaanpie)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-insert/#post-5749738)
 *     ```
       The complete error is this:
       WordPress database error Table 'wp_cf7dbplugin_st' doesn't exist for query INSERT INTO wp_cf7dbplugin_st VALUES ('1423050752.2563') made by require('C:\Inetpub\vhosts\httpdocs\newsite\wp-blog-header.php'), require_once('C:\Inetpub\vhosts\httpdocs\newsite\wp-includes\template-loader.php'), include('C:\Inetpub\vhosts\httpdocs\newsite\wp-content\themes\mytheme\template-thanksForSponsoring.php'), do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, CFDBShortCodeSavePostData->handleShortcode, do_action_ref_array, call_user_func_array, CF7DBPlugin->saveFormData, CF7DBPlugin->generateSubmitTime
       ```
   
 * I have turned OFF all generate subtime options I could find. I don’t actually
   have CF7 installed.. could this be why I am getting errors?!
 *  Thread Starter [RiaanPie](https://wordpress.org/support/users/riaanpie/)
 * (@riaanpie)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-insert/#post-5749788)
 * One more thing to add. The data IS actually saved to the database even though
   I get those errors.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-insert/#post-5749808)
 * Looks like the table failed to create during the last upgrade. As you see, that
   doesn’t break anything. This table just helps ensure you don’t get 2 submissions
   with the same timestamp.
 * Go into PHPMyAdmin and add it:
 * `CREATE TABLE IF NOT EXISTS wp_cf7dbplugin_st (submit_time DECIMAL(16,4) NOT 
   NULL, PRIMARY KEY (submit_time))`
 *  Thread Starter [RiaanPie](https://wordpress.org/support/users/riaanpie/)
 * (@riaanpie)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-insert/#post-5749812)
 * What an absolute legend you are Michael! That worked for me. THANK YOU!
    It’s
   strange, but I uninstalled the plugin and removed everything then re-installed
   it afresh and still the table did not create.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-insert/#post-5749822)
 * Looks like I missed something in the fresh install case. I’ll fix that. Thanks
   for bringing to my attention.
 *  Thread Starter [RiaanPie](https://wordpress.org/support/users/riaanpie/)
 * (@riaanpie)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-insert/#post-5749823)
 * Pleasure. Glad I could help! Amazing plugin. 🙂
 *  Thread Starter [RiaanPie](https://wordpress.org/support/users/riaanpie/)
 * (@riaanpie)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-insert/#post-5749920)
 * Hi Michael.
 * Another bug revealed itself. It looks like it has to do with duplicate entries.
 * WordPress database error Duplicate entry ‘111111111’ for key ‘PRIMARY’ for query
   INSERT INTO cf7dbplugin_st VALUES …. etc
 * Could you have a look at this, please? It feels like it’s tied in with the previous
   issue I raised.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-insert/#post-5749935)
 * What are you doing when you see this error? If you do it again, do you see the
   exact same thing?
 *  Thread Starter [RiaanPie](https://wordpress.org/support/users/riaanpie/)
 * (@riaanpie)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-insert/#post-5749954)
 * I’m not really sure. A user reported it. I have updated to latest version and
   have not been able to replicate so looksl ike it is fixed. Will post a new thread
   if I find it again. 🙂
 *  [mulli.bahr](https://wordpress.org/support/users/mullibahr/)
 * (@mullibahr)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-insert/#post-5750074)
 * I had the same problem of non-existant table.
    Recreated it. Currently, all seems
   well.
 * I suggest that it will part of the upgrade for the next version.
 * Thanks for the plugin!

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

The topic ‘WordPress database error on INSERT’ 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/)

## Tags

 * [cfdb](https://wordpress.org/support/topic-tag/cfdb/)
 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)

 * 10 replies
 * 3 participants
 * Last reply from: [mulli.bahr](https://wordpress.org/support/users/mullibahr/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-insert/#post-5750074)
 * Status: resolved