ok i arrange a script that will help you
<?
$grab_votes = "SELECT SUM(Item1) as item1, SUM(Item2) as item2, SUM(Item3) as item3 FROM votes";
$result = mysql_query($grab_votes);
$itemVotes = array("Item1","Item2","Item3");
$itemNames = array("Item1","Item2","Item3");
if (mysql_num_rows($result) == 0)
{
echo ("<SPAN CLASS='error_text'>
No entries exist.
</SPAN>");
}
else
{
?>
<DIV ALIGN='CENTER'>
<TABLE BORDER=0 COLS=2 WIDTH=300>
<TR>
<TD CLASS='table_header' ALIGN='CENTER'>
<B>Item</B>
</TD>
<TD CLASS='table_header' ALIGN='CENTER'>
<B>Votes</B>
</TD></tr>
<?
$row_counter = 0;
$result2 = mysql_query($grab_votes);
while ($row = mysql_fetch_array($result2))
{
++$row_counter;
$item1 = $row["item1"];
$item2 = $row["item2"];
$item3 = $row["item3"];
rounded ($row_counter);
?>
<TR>
<TD ALIGN='CENTER' CLASS='<? require ("votes_config.php"); echo ($row_background); ?>'>
<? echo ($item1); ?>
</TD>
<TD ALIGN='CENTER' CLASS='<? echo ($row_background); ?>'>
<? echo ($item2); ?>
</TD>
</TR>
it will be use to show sum if you want to show all records then you need new query before while statment like this
$grab_votes = "SELECT * FROM votes";
then
these value depend on your votes table structure
if thier is three field you want to get then you can also use like this
$item1 = $row[0];
$item2 = $row[1];
$item3 = $row[2];
or give field name exact as table fields name
i hope this will solve your problem
Best of Luck