I'm scripting a poll and need to create an administrator page that'll display the results. What i'd like to do is have the percentages for each selection listed. I need to know how to script it so that i can run a select count(*) to get the total number of votes then divide that into the specific questions.
I can't seem to get it to display the oount, it comes up as resource id #2.
Here's the source I have now which produces the "resource id #2":
$count = "select count(*) from survey";
$count_result = mysql_db_query($dbname, $count, $id_link);
$count_this = mysql_result($count_result,0);
thanks in advance
I can't seem to get it to display the oount, it comes up as resource id #2.
Here's the source I have now which produces the "resource id #2":
$count = "select count(*) from survey";
$count_result = mysql_db_query($dbname, $count, $id_link);
$count_this = mysql_result($count_result,0);
thanks in advance