converting
| From: | Natividad Castro | Date: | Fri, 12 Apr 2002 11:47:54 +0000 |
| Subject: | converting | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-18452@lists.php.net to get a copy of this message | ||
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.
//this is coming from my table
$crromter = $query_data[CRRINTER];
$crrhmintra = $query_data[CRRHMINTRA];
//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