Changeset 364 for trunk/client/temi
- Timestamp:
- Mar 30, 2022, 2:56:01 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/temi/Futura2/function_theme.php
r362 r364 39 39 40 40 41 $sql="select t1. *from ".$prefix."_ele_voti_".$tab." as t1 left join ".$prefix."_ele_$tab as t2 on t1.id_$tab=t2.id_$tab where t1.id_cons='$id_cons' $circos group by t1.id_sez ";42 43 41 $sql="select t1.id_sez from ".$prefix."_ele_voti_".$tab." as t1 left join ".$prefix."_ele_$tab as t2 on t1.id_$tab=t2.id_$tab where t1.id_cons='$id_cons' $circos group by t1.id_sez "; 42 $res = $dbi->prepare("$sql"); 43 $res->execute(); 44 44 if($res) 45 45 $numero=$res->rowCount(); … … 47 47 $numero=1; 48 48 $sql="select t1.* from ".$prefix."_ele_sezioni as t1 left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t1.id_cons='$id_cons' $circos"; 49 50 49 $res = $dbi->prepare("$sql"); 50 $res->execute(); 51 51 $sezioni=$res->rowCount(); 52 52 if ($numero!=0){ … … 187 187 if ($genere==4 or $visgralista){$tab="ele_voti_lista";} 188 188 if ($votog){$tab="ele_voti_lista";} 189 $sql="select *from ".$prefix."_$tab where id_cons='$id_cons' group by id_sez ";190 191 189 $sql="select id_sez from ".$prefix."_$tab where id_cons='$id_cons' group by id_sez "; 190 $res = $dbi->prepare("$sql"); 191 $res->execute(); 192 192 if ($circo){ 193 193 $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 "; … … 248 248 left join ".$prefix."_$tab as t2 on (t1.id_gruppo=t2.id_gruppo) 249 249 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons $circondt1 250 group by t 2.id_gruppo250 group by t1.id_gruppo, t1.num_gruppo, t1.descrizione 251 251 order by somma desc"; 252 252 $cosa='id_gruppo'; … … 474 474 if ($circo) $circos = "and id_circ=$id_circ" ; else $circos=''; 475 475 if ($genere==0) $tab="ref"; else $tab="gruppo"; 476 $sql="select *from ".$prefix."_ele_voti_".$tab." where id_cons='$id_cons' $circos group by id_sez ";477 478 476 $sql="select id_sez from ".$prefix."_ele_voti_".$tab." where id_cons='$id_cons' $circos group by id_sez "; 477 $res = $dbi->prepare("$sql"); 478 $res->execute(); 479 479 $numero=$res->rowCount(); 480 480 $sql="select * from ".$prefix."_ele_sezioni where id_cons='$id_cons' $circos "; 481 482 481 $res = $dbi->prepare("$sql"); 482 $res->execute(); 483 483 $sezioni=$res->rowCount(); 484 484 //$res = mysql_query("select chiusa from ".$prefix."_ele_cons_comuni where id_cons='$id_cons' $circos ",$dbi); … … 606 606 left join ".$prefix.$scelta." 607 607 where t1.id_cons='$id_cons' 608 group by t2.id_cand 609 610 order by somma desc 611 612 "; 608 group by t1.id_lista, t1.id_cand, t1.nome, t1.cognome 609 order by somma desc"; 613 610 $res = $dbi->prepare("$sql"); 614 611 $res->execute(); … … 679 676 680 677 // numero sezioni 681 $sql="select t3. *from ".$prefix."_ele_voti_".$tab." as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.id_sez ";678 $sql="select t3.id_sez from ".$prefix."_ele_voti_".$tab." as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.id_sez "; 682 679 $sez_num = $dbi->prepare("$sql"); 683 680 $sez_num->execute(); … … 1135 1132 1136 1133 1137 $sql="select t3. * from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario'group by t3.id_sez ";1134 $sql="select t3.id_sez from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario' group by t3.id_sez "; 1138 1135 $res1 = $dbi->prepare("$sql"); 1139 1136 $res1->execute(); … … 1215 1212 if ($genere==0) $tab="ref"; 1216 1213 1217 $sql="select t3. *from ".$prefix."_ele_voti_".$tab." as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.id_sez ";1214 $sql="select t3.id_sez from ".$prefix."_ele_voti_".$tab." as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.id_sez "; 1218 1215 $res = $dbi->prepare("$sql"); 1219 1216 $res->execute();
Note:
See TracChangeset
for help on using the changeset viewer.