Title: NULL vs empty string
Last modified: April 13, 2023

---

# NULL vs empty string

 *  Resolved [ucgf](https://wordpress.org/support/users/ucgf/)
 * (@ucgf)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/null-vs-empty-string/)
 * Hi,
 * I’m having trouble with data entry and default values – some of our columns in
   the database are ‘text DEFAULT NULL’ but blank fields in the data entry form 
   are saved as an empty string.
 * I have tried to set the default value to NULL on the data entry template as well,
   but that made no difference – still entered as an empty string. Have I missed
   a setting somewhere?
 * Thanks!
   Una
 * (I’m working with WP Data Access Premium 5.3.8)

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

 *  [Leeberty](https://wordpress.org/support/users/aaronvincentlee/)
 * (@aaronvincentlee)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/null-vs-empty-string/#post-16654026)
 * Hi [@ucgf](https://wordpress.org/support/users/ucgf/) ,
 * Thanks for the post!
 * The database column needs to be allowed to have **NULL** values. You can check
   that in the structure/schema of your table.
 * Can you please let us know what DBMS you are currently using?
 * We’ll wait for your reply.
 *  Thread Starter [ucgf](https://wordpress.org/support/users/ucgf/)
 * (@ucgf)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/null-vs-empty-string/#post-16656489)
 * Hi,
 * Yes the database columns are allowed to have NULL values, and the default is 
   NULL. It’s a wordpress.com site and the DBMS is MySQL. I’ve been interacting 
   with it through phpmyadmin version 5.2.1 and via WP Data Access. There’s no problem
   entering NULL in phpmyadmin.
 * In addition, if I change the default to some random piece of text in phpmyadmin,
   or set the default to ‘none’, and then leave the field blank on the WP data access
   data entry form – it still appears as an empty string.
 * I also have a problem with a boolean column…it might not be related but just 
   in case. It appears as a tick box on the data entry form, but even when ‘ticked’
   it is not recorded as true in the table – it reverts to NULL after saving. Other
   columns with data in them are appearing just fine – I’ll keep experimenting!
 * Thanks, Una
 *  Plugin Contributor [Kim L](https://wordpress.org/support/users/kimmyx/)
 * (@kimmyx)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/null-vs-empty-string/#post-16663044)
 * Hi [@ucgf](https://wordpress.org/support/users/ucgf/),
 * Thanks for the response.
 * Is there a page where we can test this data entry form?
 *  [Adviata Ashrama](https://wordpress.org/support/users/advaitaashrama/)
 * (@advaitaashrama)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/null-vs-empty-string/#post-16691473)
 * Namaste,
   We are also facing the same issue. When updating data from the data 
   explorer of WP-data-access, it is taking blank value as an empty string and not
   as NULL. Due to this, it does not allow us to update the record.There are foreign
   Key constraints to avoid any empty Strings.Here is my question:How can we enter‘
   NULL’ value using data explorer ?
 *  Thread Starter [ucgf](https://wordpress.org/support/users/ucgf/)
 * (@ucgf)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/null-vs-empty-string/#post-16710448)
 * Hi,
 * I’m sorry for the long delay – we do still have this problem. I can’t easily 
   share at the moment, unless you have a suggestion – the site is not public and
   the data entry isn’t on a front page.
 * Thanks, Una
 *  [Leeberty](https://wordpress.org/support/users/aaronvincentlee/)
 * (@aaronvincentlee)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/null-vs-empty-string/#post-16712507)
 * Hi [@ucgf](https://wordpress.org/support/users/ucgf/) ,
 * Please feel free to send us a private message here [https://wpdataaccess.com/contact/](https://wpdataaccess.com/contact/),
   so that we can assist you better.
 * We’ll wait for your message. 🙂

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

The topic ‘NULL vs empty string’ is closed to new replies.

 * ![](https://ps.w.org/wp-data-access/assets/icon-256x256.png?rev=3299063)
 * [WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards](https://wordpress.org/plugins/wp-data-access/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-data-access/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-data-access/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-data-access/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-data-access/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [Leeberty](https://wordpress.org/support/users/aaronvincentlee/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/null-vs-empty-string/#post-16712507)
 * Status: resolved