Programming in mysql: php/mysql posting COUNT(*) FROM Poll total yes/no on newest questions tagged mysql – Stack Overflow

I’m trying to count the yes and no votes so that I can just post the total yes/no for my website. This is should be easy, but I must be missing something somewhere since I don’t get a return result. At least no php error. My total vores

$result = mysql_query("SELECT * FROM Poll");

$votes_Poll = mysql_num_rows($result);

$vote_yes = mysql_query("SELECT vote, COUNT(*) FROM Poll GROUP BY yes");
$vote_no = mysql_query("SELECT vote, COUNT(*) FROM Poll GROUP BY no");

// Display the results

echo $votes_Poll;
echo "<br>";
echo $vote_yes;
echo "<br>";
echo $vote_no;

thanks in advance

See Answers


source: http://stackoverflow.com/questions/6065753/php-mysql-posting-count-from-poll-total-yes-no
Programming in mysql: programming-in-mysql



online applications demo