Title: WordPress database error Column &#039;attachment_status&#039; cannot be null
Last modified: August 30, 2016

---

# WordPress database error Column 'attachment_status' cannot be null

 *  Resolved [niuserre](https://wordpress.org/support/users/niuserre/)
 * (@niuserre)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-column-attachment_status-cannot-be-null/)
 * Contact Form by BestWebSoft – Version 3.96
    Contact Form to DB by BestWebSoft–
   Version 1.5.1
 * I have Contact Form installed alone but it wasn’t sending emails, there were 
   no errors and SMTP etc didn’t fix it.
 * So I installed CF to DB to see if it would save and this error came up in the
   error logs:
 * `DOMAIN.com [Sat Dec 19 18:57:48 2015] [error] [client xxx.xxx.xxx.xxx:xxxxx]
   AH01215: WordPress database error Column 'attachment_status' cannot be null for
   query INSERT INTO`tablepre_cntctfrmtdb_message`(`from_user`,`user_email`,`subject`,`
   message_text`,`sent`,`dispatch_counter`,`was_read`,`status_id`,`attachment_status`)
   VALUES ('TestName', 'email@gmail.com', 'Testing 17', 'qweghfqejwbgf', '1', '1','
   0', '1', NULL) made by require('wp-blog-header.php'), require_once('wp-load.php'),
   require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'),
   call_user_func_array, cntctfrm_init, cntctfrm_check_and_send, cntctfrm_check_form,
   do_action('cntctfrm_check_dispatch'), call_user_func_array, cntctfrmtdb_check_dispatch,
   cntctfrmtdb_save_message, cntctfrmtdb_save_new_message: /home/sites/DOMAIN.com/
   public_html/index.php`
 * I enabled the Attachment Block for the form (it was disabled), and then attached
   an image when I sent the form. This time the form saved to the DB *and* sent 
   the email as expected.
 * This isn’t a required field and wasn’t even enabled on the form. Is this a plugin
   bug?
 * Thanks,
    Hayley
 * [https://wordpress.org/plugins/contact-form-to-db/](https://wordpress.org/plugins/contact-form-to-db/)

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

 *  Plugin Author [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * (@bestwebsoft)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-column-attachment_status-cannot-be-null/#post-6868032)
 * Hi,
 * We have received your request and it is now being processed. We will get back
   to you on this forum as soon as we can.
 * Regards,
    BestWebSoft Support Team
 *  Plugin Author [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * (@bestwebsoft)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-column-attachment_status-cannot-be-null/#post-6868047)
 * Hi,
 * This problem existed in the plugin version 1.5.1. At the moment it is fixed in
   version 1.5.2. Please update the plugin.
 * Sincerely,
    BestWebSoft Support Team

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

The topic ‘WordPress database error Column 'attachment_status' cannot be null’ is
closed to new replies.

 * ![](https://ps.w.org/contact-form-to-db/assets/icon-128x128.gif?rev=2617080)
 * [Contact Form to DB by BestWebSoft - Messages Database Plugin For WordPress](https://wordpress.org/plugins/contact-form-to-db/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-to-db/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-to-db/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-to-db/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-to-db/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-to-db/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-column-attachment_status-cannot-be-null/#post-6868047)
 * Status: resolved