update some table set some_field='X' where ((some_field IS NULL) OR (some_field!=""));
HTH
Andrey
----- Original Message -----
From: "Natividad Castro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php