Changeset 70
- Timestamp:
- Apr 1, 2010, 1:38:28 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/funzioni.php
r66 r70 311 311 $gruppinum=mysql_num_rows($res); 312 312 $altrivoti=0; 313 ###### gestione percentuali 314 $arperc=array(); 315 $arval=array(); 316 $arvaltot=0; 317 while (list($id,$num,$descrizione,$voti) = mysql_fetch_row($res)){ 318 $arval[$id]=$voti; 319 $arvaltot+=$voti; 320 } 321 $arperc=arrayperc($arval,$arvaltot); 322 mysql_data_seek($res,0); 323 ###### 313 324 while (list($id,$num,$descrizione,$voti) = mysql_fetch_row($res)){ 314 325 … … 323 334 if ($tot!='' and $tot!='0') 324 335 $pro[$i]=number_format($voti*100/$tot,3); 325 $pro[$i]=number_format($ pro[$i],2); // arrotondamento336 $pro[$i]=number_format($arperc[$id],2); // arrotondamento 326 337 327 338
Note:
See TracChangeset
for help on using the changeset viewer.