RE: [PHP] Variable value doesn't stay "Null"

From: Date: Thu, 15 Mar 2001 20:19:46 +0000
Subject: RE: [PHP] Variable value doesn't stay "Null"
Groups: php.general 
Request: Send a blank email to php-general+get-44115@lists.php.net to get a copy of this message
You may want to check the field definitions in the database table. If I recall correctly, some MySQL numeric field types default to "0" when an empty string gets written to them. The problem (and solution) may not be in the PHP script at all. Kirk > -----Original Message----- > From: Michael Conley [mailto:mconley@RentHistory.com] > Sent: Thursday, March 15, 2001 1:01 PM > To: 'Chris Lee'; php-general@lists.php.net > Subject: RE: [PHP] Variable value doesn't stay "Null" > > > So how do I get the PHP script that stores the information in > the My SQL > database to not store "0"? a "0" value is a valid value for > this variable. > I don't want 0 to be the value of the variable if nothing is > entered. Right > now, the database is populated with 0's for the fields that > are not filled > in. >

« previous php.general (#44115) next »