RE: [PHP-DB] Inserting NULL?

From: Date: Fri, 03 Aug 2001 20:35:45 +0000
Subject: RE: [PHP-DB] Inserting NULL?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-11053@lists.php.net to get a copy of this message
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') { > > $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 > > > -- > 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 >

« previous php.db (#11053) next »