Does anyone know how to work arround this problem of sum function in php?
The below query is giving me wrong results
SELECT
Expand|Select|Wrap|Line Numbers
- SUM(((kinisis_1c + kinisis_1e + ((kinisis_1c / kinisis_1b) * kinisis_1a))/(1 + fpa)) * 1.005) AS kinisis_1_total,
- SUM(((100c + 100e + ((100c / 100b)* 100a)) / (1 + fpa)) *1.005) AS 100ara_total,
- SUM(((super_1c + super_1e + ((super_1c / super_1b)* super_1a)) / (1 + fpa)) *1.005) AS super_1_total,
- SUM(((95_1c + 95_1e + ((95_1c / 95_1b)* 95_1a)) / (1 + fpa)) *1.005) AS 95_1_total,
- SUM(((95_2c + 95_2e + ((95_2c / 95_2b)* 95_2a)) / (1 + fpa)) *1.005) AS 95_2_total,
- SUM(((super_2c + super_2e + ((super_2c / super_2b) * super_2a)) / (1 + fpa)) *1.005) AS super_2_total,
- SUM(((kinisis_2c + kinisis_2e + ((kinisis_2c / kinisis_2b) * kinisis_2a)) / (1 + fpa)) *1.005) AS kinisis_2_total
- FROM kiniseis
- WHERE `date` BETWEEN '$_GET[date1]' AND '$_GET[date2]'
I found that microsoft sql server has problem like that
http://support.microsoft.com/kb/281341
But the work around they suggest is not working in mysql-php i have tried that also making sum of a variable.
Does anyone know how to prevent this issue from happening?