I try new code like this:

PHP Code:
$query "SELECT cloth_type FROM clt_transact WHERE cloth_type IN('AAA', 'BBB', 'CCC')";
                      
$result mysql_query($query);
                      
//$cloth_type = $result['cloth_type'];
                      
if($result){
                            
$CLT_yield = @($clicking_output / ($spreading_input 8.8)) * 100;
                                 }
                      else{
                            
$CLT_yield = @($clicking_output / ($spreading_input 9)) * 100;
                          } 
To test if the two formula was work i have data that the cloth type is AAA and I have data that the cloth type is DDD and when I run my code only the first formula was work even the cloth type is DDD. I don't know why the else condition did not work in cloth type DDD.why the formula in AAA was work in the DDD cloth type. I mean only this formula:$CLT_yield = @($clicking_output / ($spreading_input * 8.8)) * 100; was work in both AAA and DDD.

Thank you