RE: [PHP] Variable value doesn't stay "Null"
| From: | Michael Conley | Date: | Thu, 15 Mar 2001 20:21:42 +0000 |
| Subject: | RE: [PHP] Variable value doesn't stay "Null" | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-44120@lists.php.net to get a copy of this message | ||
The default value is null in the database.
-----Original Message-----
From: Johnson, Kirk [mailto:kjohnson@zootweb.com]
Sent: Thursday, March 15, 2001 12:20 PM
To: php-general@lists.php.net
Subject: RE: [PHP] Variable value doesn't stay "Null"
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.
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net