Changeset 364 for trunk/client/modules/Elezioni/grafici.php
- Timestamp:
- Mar 30, 2022, 2:56:01 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/grafici.php
r352 r364 393 393 function graf_gruppo($visgralista){ 394 394 global $admin, $bgcolor1, $bgcolor5, $prefix, $dbi, $offset, $min,$descr_cons,$genere,$votog,$votol,$votoc,$circo, $id_cons,$id_cons_gen,$id_comune,$id_circ,$tipo_cons,$w,$l,$op,$siteistat,$flash,$tema,$copy; 395 if ($siteistat==$id_comune) $logo=$siteistat; else $logo=''; // logo per il comune396 $logo=verificasimbolo(); // carica_logo da funzioni.php395 if ($siteistat==$id_comune) $logo=$siteistat; else $logo=''; // logo per il comune 396 $logo=verificasimbolo(); // carica_logo da funzioni.php 397 397 if (!$id_circ and $circo){ 398 398 $sql="SELECT id_circ from ".$prefix."_ele_circoscrizione where id_cons=$id_cons order by num_circ limit 0,1"; 399 $res_sez = $dbi->prepare("$sql");400 $res_sez->execute();399 $res_sez = $dbi->prepare("$sql"); 400 $res_sez->execute(); 401 401 402 402 list($id_circ)=$res_sez->fetch(PDO::FETCH_NUM); … … 406 406 if ($genere==4 or $visgralista){$tab="lista";} 407 407 if ($votog){$tab="lista";} 408 $sql="select *from ".$prefix."_ele_voti_$tab where id_cons='$id_cons' group by id_sez ";408 $sql="select id_sez from ".$prefix."_ele_voti_$tab where id_cons='$id_cons' group by id_sez "; 409 409 $res = $dbi->prepare("$sql"); 410 410 $res->execute(); … … 412 412 if ($circo){ 413 413 $sql="select t1.* from ".$prefix."_ele_voti_gruppo as t1, ".$prefix."_ele_gruppo as t2 where t1.id_gruppo=t2.id_gruppo and t1.id_cons='$id_cons' and t2.id_circ=$id_circ group by t1.id_sez "; 414 $res = $dbi->prepare("$sql");415 $res->execute();414 $res = $dbi->prepare("$sql"); 415 $res->execute(); 416 416 417 417 $sql="select sum(t1.voti) from ".$prefix."_ele_voti_gruppo as t1, ".$prefix."_ele_gruppo as t2 where t1.id_gruppo=t2.id_gruppo and t1.id_cons='$id_cons' and t2.id_circ=$id_circ"; 418 $restotv = $dbi->prepare("$sql");419 $restotv->execute();418 $restotv = $dbi->prepare("$sql"); 419 $restotv->execute(); 420 420 421 421 $circond="and id_circ=$id_circ";$circondt1="and t1.id_circ=$id_circ"; … … 476 476 left join ".$prefix."_ele_voti_$tab as t2 on (t1.id_gruppo=t2.id_gruppo) 477 477 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons $circondt1 478 group by t 2.id_gruppo478 group by t1.id_gruppo, t1.num_gruppo, t1.descrizione 479 479 order by somma desc"; 480 480 $cosa='id_gruppo'; … … 751 751 left join ".$prefix.$scelta." 752 752 where t1.id_cons='$id_cons' $circos 753 group by t3.id_cand 754 755 order by somma desc 756 757 "; 758 $res = $dbi->prepare("$sql"); 759 $res->execute(); 753 group by t1.id_lista, t1.id_cand, t1.nome, t1.cognome 754 order by somma desc"; 755 $res = $dbi->prepare("$sql"); 756 $res->execute(); 760 757 761 758 $n_candi=$res->rowCount();
Note:
See TracChangeset
for help on using the changeset viewer.