Problem:
When modifying house information, one field is the total number of floors floorall, which is an int field, allowing null
When the information is modified, if the value of this field is entered, a value is written to the database and Null is written to the database if no value is entered
How to do it?
That's what I wrote.
if ($floorall = = ") {$floorall =null;}
$db->query ("Updata tabel set floorall = ' $floorall '");
However, the value written in this way is 0 instead of NULL
Answer:
Hello, please execute the following statement:
Updata tabel Set floorall = null
http://www.bkjia.com/PHPjc/364368.html www.bkjia.com true http://www.bkjia.com/PHPjc/364368.html techarticle problem: When modifying house information, there is a field that is the total number of floors floorall, is an int field, allows to change information when the time is entered, if the value of this field, then write a value to the database ...