I am building an SQL string. This code along with other code is sent to the next page and is submitted. My problem is that many times the denominator in the equation is 0. How can I deal with this. I was considering making the denominator portion a variable called $denom and only doing the below if $denom != 0. I keep getting a synatax error. Also if $denom = 0 then would
$strSQL=0;?
$strSQL=$strSQL.$table3.".".$pre.$yr_array[$j].", ";
$strSQL=$strSQL."((".$table.".".$pre.$yr_array[$j]."/".$table3.".".$pre.$yr_array[$j].") " .$table2.".".$pre2.$yr_array[$j].") as " .$newpre.$yr_array[$j];