Web development in contact with PHP for some time, in the database operation often encountered a problem, so that the same field in the page display with 3 types of null,null and Numbers , the solution is to define this field as a varchar type, quotation marks when inserting data have not been studied in depth. Today's problem has come up again, when the inserted value is null, the page display is empty! Careful study found that:
1. When you insert ' null ' and ' null ' into the data table, the data table displays null and empty, respectively.
2. When you insert null into the data table, it is displayed in the datasheet as null.
3. When you select ' null ' from the database, only the part of insert that is ' null ' is displayed as null.
4. When you select null from the database, only the part of insert that is null is displayed as NULL.
Further, it is concluded that the data table ' NULL ' and null are different concepts, although the display is the same. In fact, NULL is a relatively special field. In the MySQL database, in different situations, null values often represent different meanings. and ' NULL ' is the character type, mainly the two show the same, in the database is not very familiar with the students are prone to confuse ⊙﹏⊙.
Reference: http://blog.csdn.net/eroswang/article/details/8529817
The difference between null and NULL in MySQL