Hey guys, I've got a problem with this piece of code....
it is skipping the contents of the if and elseif statements and only printing the else 
values, even though the if or one of the elseif statements might be true.
what could possibly be the problem??

--------------------------------------------------------------------------------------------
$eventQuery=ifx_query('select * from eventtable'
      .' where e_date >= today '
      .' and e_status in ("O","C") '
       .' and out_id is not null '
      .' order by s_acro, e_acro ',$db) or die (ifx_error());

while($cols=ifx_fetch_row($eventQuery)) 
 {
 if (($cols['s_acro']=='CF') || ($cols["s_acro"]=='PF')) 
   {
    $r_away['sport']='1';
    $r_home['sport']='1';
    $s_lt='PS';
    $t_lt='TP';
   }

  elseif (($cols['s_acro']=='PB') || ($cols['s_acro']=='CB'))
   {
    $r_away['sport']='2';
    $r_home['sport']='2';
    $s_lt='PS';
    $t_lt='TP';
   }
  
  elseif ($cols['s_acro']=='B')
   {
    $r_away['sport']='3';
    $r_home['sport']='3';
    $s_lt='ML';
    $t_lt='TM';
   }
   
  else   {
    $r_away['sport']='4';
    $r_home['sport']='4';
    $s_lt='ML';
    $t_lt='TM';
   }
--------------------------------------------------------------------------------------------
output is always:  4, ML, TM


thanks in advance

Reply via email to