- Joined
- Jan 25, 2012
- Messages
- 114
- Reaction score
- 4
I whant to make Top 10 Voters and i need to sum() my vote_count
I test eny tutorials but not luck !
$Status=mssql_query("select TOP 10 SUM(vote_count),vote_acc from TABLE order by vote_count desc");
while($row=mssql_fetch_assoc($Status)){
$vote_count=$row['vote_count'];
$Name=$row['vote_acc'];
<td class="test"><div class="NameOfCaracter"><?=$Name;?></div></td>
<td class="test"><div align="center"><?=$vote_count;?></div></td>
I this first problmes is mssql_fetch_assoc here ! i thick mssql_fetch_array is corecty !
So whant i need to fixed to count my SUM all points in 1 name !
Thx
I test eny tutorials but not luck !
$Status=mssql_query("select TOP 10 SUM(vote_count),vote_acc from TABLE order by vote_count desc");
while($row=mssql_fetch_assoc($Status)){
$vote_count=$row['vote_count'];
$Name=$row['vote_acc'];
<td class="test"><div class="NameOfCaracter"><?=$Name;?></div></td>
<td class="test"><div align="center"><?=$vote_count;?></div></td>
I this first problmes is mssql_fetch_assoc here ! i thick mssql_fetch_array is corecty !
So whant i need to fixed to count my SUM all points in 1 name !
Thx

