query the total number of votes
then total the number of yes votes
the maths is (100/total votes) *yes votes
which will give you the pecentage of yes votes
to get no votes take yes percentage away from 100
$sql1=mysql_query("SELECT vote FROM table");
$sql2=mysql_query("SELECT vote AS COUNT FROM table WHERE vote = 'yes'");
$yesvote=mysql_num_rows($sql2);
$totalvotes=mysql_num_rows($sql1);
$yesper=(100/$totalvotes)*$yesvote;