Question
"Division by zero is not allowed" error
Hi all, I am using the syntax below:
<cfset PercentageOfConversionTotalLG = (totalCases.RecordCount/staffMember.RecordCount)*100/>
basically two recordset totals divided to give me a figure, sometimes this figure turns out at 0, so obviouslly 0% and that is what it shows, but other times it shows this error: Division by zero is not allowed, and refers to the above line of code... is there a way around this error? does anyone know please?
Many thanks in advance
<cfset PercentageOfConversionTotalLG = (totalCases.RecordCount/staffMember.RecordCount)*100/>
basically two recordset totals divided to give me a figure, sometimes this figure turns out at 0, so obviouslly 0% and that is what it shows, but other times it shows this error: Division by zero is not allowed, and refers to the above line of code... is there a way around this error? does anyone know please?
Many thanks in advance