Changeset 389 for trunk/client/modules/Elezioni/votanti-inc.php
- Timestamp:
- Jan 30, 2023, 9:08:11 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/votanti-inc.php
r384 r389 19 19 if (isset($param['minsez'])) $minsez=intval($param['minsez']); else $minsez=''; 20 20 if (isset($param['id_lista'])) $id_lista=intval($param['id_lista']); else $id_lista=''; 21 if (isset($param['id_circ'])) $id_circ=intval($param['id_circ']); else $id_circ=0;21 if (isset($param['id_circ'])) $id_circ=intval($param['id_circ']); 22 22 if (isset($param['csv'])) $csv=intval($param['csv']); else $csv=''; 23 23 if (isset($param['min'])) $min=intval($param['min']); else $min= 0; … … 53 53 list($tipo_cons,$genere,$id_cons) = $res->fetch(PDO::FETCH_NUM); 54 54 global $lang,$circo,$id_circ; 55 if(!isset($id_circ)) $id_circ=0; 55 56 if(isset($circo)) $_SESSION['id_circ']=$id_circ; 56 57 if (isset($circo) and $circo) {$circos="and t2.id_circ='$id_circ'"; $circos4="and t4.id_circ='$id_circ'";} … … 158 159 </div>"; 159 160 } 160 $sql="SELECT sum(maschi),sum(femmine) FROM ".$prefix."_ele_sezioni where id_cons='$id_cons'"; 161 if($circo) 162 $sql="SELECT sum(t1.maschi),sum(t1.femmine) FROM ".$prefix."_ele_sezioni as t1,".$prefix."_ele_sede as t2 where t1.id_sede=t2.id_sede $circos"; 163 else 164 $sql="SELECT sum(maschi),sum(femmine) FROM ".$prefix."_ele_sezioni where id_cons='$id_cons'"; 161 165 $res = $dbi->prepare("$sql"); 162 166 $res->execute();
Note:
See TracChangeset
for help on using the changeset viewer.