Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    Vancouver, BC
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Setting table to accept BLANK content

    SO I have a field in phpmyadmin in which I would like to be able to have the following:

    - Can be BLANK
    - If blank save "N/A"
    - Can contain 6300 or 6,300 (number)

    I tried different settings but it just saves blank as "0" no matter what I do..

    Attached is a capture of the table structure.
    Attached Thumbnails Attached Thumbnails Setting table to accept BLANK content-test.jpg  

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    This sounds like a situation where you should be using NULL (which means unknown or not applicable). That's the only value other than a number that can be stored in a numeric field.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    Vancouver, BC
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall View Post
    This sounds like a situation where you should be using NULL (which means unknown or not applicable). That's the only value other than a number that can be stored in a numeric field.
    "Default" NULL" or "Null" checked?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •