RE: [PHP-DB] Inserting NULL?
| From: | Miles Thompson | Date: | Fri, 03 Aug 2001 23:39:27 +0000 |
| Subject: | RE: [PHP-DB] Inserting NULL? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-11055@lists.php.net to get a copy of this message | ||
Jeff,
So you are relly looking at an effect similar to a check box.
I'll admit I prefer explicit "yes's" and "no's"; if a field is just empty I wonder if it somehow got missed. Different styles.
Miles
At 03:35 PM 8/3/01 -0500, Jeff Oien wrote:
What I want in the output from the database is for 'Yes' to be 'Yes' and No (in the original input) to be nothing. Someone else's script is just looking for Yes in the output. If that makes any sense. So "No value here" sounds like what I want. I think. Jeff Oien Jeff, NULL isn't the same as no; it's closer to "Don't know" or, more accurately "No value here." Yes is Yes, No is No, and if you are asking for a date, Maybe is a Null. Cheers - Miles At 12:03 PM 8/3/01 -0500, Jeff Oien wrote:I have a variable that is either Yes or No. I would like NULL to be inserted if it's No. Can I do this? if ($variable == 'No') {-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net$variable = 'NULL';} then INSERT it. Thanks. Jeff Oien -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net