Posted: Wed Jul 03, 2002 3:46 pm
$len1 = mysql_query("select count(*) from poll where vote == 1");
$len2 = mysql_query("select count(*) from poll where vote == 2");
$len3 = mysql_query("select count(*) from poll where vote == 3");
$sum = $len1 + $len2 + $len3;
$onepre = (@($len1 / $sum) * 100);
$twopre = (@($len2 / $sum) * 100);
$twopre = (@($len3 / $sum) * 100);
thats what i have now but the numbers dont show its all just zeros....
http://dragonsblood.nicewebshost.com/cbaa/showresults.php
and for votes i voted a couple of times for 1 (which is the first option)
btw .... thanks for all the help, so far.
$len2 = mysql_query("select count(*) from poll where vote == 2");
$len3 = mysql_query("select count(*) from poll where vote == 3");
$sum = $len1 + $len2 + $len3;
$onepre = (@($len1 / $sum) * 100);
$twopre = (@($len2 / $sum) * 100);
$twopre = (@($len3 / $sum) * 100);
thats what i have now but the numbers dont show its all just zeros....
http://dragonsblood.nicewebshost.com/cbaa/showresults.php
and for votes i voted a couple of times for 1 (which is the first option)
btw .... thanks for all the help, so far.