Page 1 of 1

[SOLVED] problem with sum() funtion

Posted: Thu Dec 18, 2003 1:23 am
by pelegk2
i am doing
SELECT SUM('val') as xx from mydata
where val is of type float
even when i do this on mySql i get 0 as the total value!!!!
why?
(i dont have negative numbers
thanks in advance
peleg
?>

Posted: Thu Dec 18, 2003 5:15 am
by oQEDo
Try SELECT SUM(val) as xx from mydata (i.e. miss out the ' )

Posted: Thu Dec 18, 2003 5:34 am
by pelegk2
thanks it worked:)