Re: converting

From: Date: Fri, 12 Apr 2002 12:58:23 +0000
Subject: Re: converting
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18453@lists.php.net to get a copy of this message
update some table set some_field='X' where ((some_field IS NULL) OR (some_field!="")); HTH Andrey ----- Original Message ----- From: "Natividad Castro" <ncastro@cots.com> To: <php-db@lists.php.net> Sent: Friday, April 12, 2002 2:47 PM Subject: [PHP-DB] converting > Hi to all, > I'm having a lot of problems doing something that for some of you might be > simple. > I'm selecting fields from a table that can have an 'A', 'B' or > 'C' as their > value > e.g. FIELDNAME_1 = 'A' > FIELDNAME_1 = 'B' > FIELDNAME_1 = 'C' > FIELDNAME_2 = 'A' AND SO ON > what I'm trying to do is: if this field is no empty convert whatever value > to 'X'. This part works fine only if the field has a value, but if the > doesn't have a value, still giving an 'X'. > here is some part of the code. any help is greatly appreciate. > > file://this is coming from my table > $crromter = $query_data[CRRINTER]; > $crrhmintra = $query_data[CRRHMINTRA]; > > file://this is what I'm trying to do > <? if ($crrinter != "") > { > $crrinter_x = "X"; > } > echo $crrinter_x; > > > if empty($crrhmintra != "") > { > $crrhmintra_yy = "X"; > } > echo ($crrhmintra; > > Thanks in advanced > Nato > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.db (#18453) next »