The basic premis of this is that I want to count the total number of votes for my poll to figure out the percentages. The script I have worked fine on other servers, but when I run it, it gives fatal call saying sum() is a undeclared function.
Is it something in my settings, or my code? I am running PHP 4.3.5 and MySQL 4.0.8
//Login, select DB
$result = mysql_query("select sum(choice_sum) from cur_poll");
$row = mysql_fetch_array($result);
print "blah blah blu ".$row['sum(choice_sum)'];
I have tried taking out the ' ' when calling sum and it gives the same error. I have tried not making it a array but just stopping after declaaring $result, but that gives the output of system recource #3.
Thanks in advance
-Edi